AS::Callbacks: improved __define_runner performance #4189

Merged
merged 1 commit into from Dec 25, 2011

Conversation

Projects
None yet
2 participants
Contributor

bogdan commented Dec 25, 2011

We don't need to Redefine runner method on each __define_runner anymore.

Result: 20% perfomance improvement for set_callback method: https://gist.github.com/1519380

Rehearsal ----------------------------------------------------
New set_callback   0.450000   0.020000   0.470000 (  0.477188)
Old set_callback   0.580000   0.010000   0.590000 (  0.600057)
------------------------------------------- total: 1.060000sec

                       user     system      total        real
New set_callback   0.470000   0.010000   0.480000 (  0.478684)
Old set_callback   0.580000   0.020000   0.600000 (  0.600981)
************************************************************************************************************************
Rehearsal -----------------------------------------------------
New run_callbacks   0.060000   0.000000   0.060000 (  0.060021)
Old run_callbacks   0.060000   0.000000   0.060000 (  0.060024)
-------------------------------------------- total: 0.120000sec

                        user     system      total        real
New run_callbacks   0.050000   0.010000   0.060000 (  0.059831)
Old run_callbacks   0.060000   0.000000   0.060000 (  0.060878)

josevalim merged commit e33c946 into rails:master Dec 25, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment