Created
July 29, 2010 22:01
-
-
Save hosh/499377 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| hhh@sparkfly-rails3 ~/work/sparkfly/benchmarks/metaprogramming $ uname -a | |
| Linux sparkfly-rails3 2.6.31-gentoo-r10 #1 SMP Fri Mar 26 23:55:26 Local time zone must be set--see zic x86_64 Intel(R) Core(TM)2 Duo CPU P8800 @ 2.66GHz GenuineIntel GNU/Linux | |
| hhh@sparkfly-rails3 ~/work/sparkfly/benchmarks/metaprogramming $ ruby -v | |
| ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux] | |
| hhh@sparkfly-rails3 ~/work/sparkfly/benchmarks/metaprogramming $ ruby bench_meta.rb | |
| user system total real | |
| instance_eval/str 68.230000 0.070000 68.300000 ( 88.718078) | |
| class_eval/str 69.370000 0.050000 69.420000 ( 93.801272) | |
| eval/str 70.800000 0.020000 70.820000 (100.582867) | |
| define_method/class 48.570000 0.100000 48.670000 ( 65.632684) | |
| define_method/send 49.210000 1.710000 50.920000 ( 68.066280) | |
| def/unbind/bind 55.160000 0.010000 55.170000 ( 81.814569) | |
| instance_eval/proc 41.570000 0.020000 41.590000 ( 61.355564) | |
| class_eval/proc 38.890000 0.020000 38.910000 ( 53.819185) | |
| def 36.990000 0.000000 36.990000 ( 49.792060) | |
| method/bind 9.510000 0.030000 9.540000 ( 12.664009) | |
| # Benchmark uses unmodified code from: http://www.mathewabonyi.com/articles/2007/01/11/surprise-10min-benchmark-eval-class_eval-instance_eval-define_method-bind |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment