On Wed, May 20, 2009 at 8:37 AM, Roger Pack <rogerpack2005 / gmail.com> wrote:
>
>> Wraps rb_add_event_hook so you can write fast ruby event hook
>> processors w/o the speed penalty that comes with set_trace_func (sooo
>> sloooow!). Calls back into ruby so you don't have to write C.
>
> Wow thanks for doing this--anybody know why rb_add_event_hook is so much
> faster then?
>
> A drop in replacement for set_trace_func might be sweet, too :)
>

set_trace_func requires creating a new Binding object for each event
triggered. In Ruby 1.8.x this is very very slow operation. Ruby 1.9.x
reuses these Binding objects as much as possible, which makes this
operation much faster and lead to a way more acceptable speed of
debug.rb.