Skip to content

Instantly share code, notes, and snippets.

@gamache
Last active December 25, 2015 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gamache/6962596 to your computer and use it in GitHub Desktop.
Save gamache/6962596 to your computer and use it in GitHub Desktop.
Running method-cache-test.rb on Ruby 2.0.0-p195.
$ ruby --version
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
$ ruby method-cache-test.rb
user system total real
defined methods, not busting cache:
0.270000 0.000000 0.270000 ( 0.273828)
method_missing dispatch, not busting cache:
0.410000 0.000000 0.410000 ( 0.408970)
defined methods, busting cache with trivial Object#extend:
1.390000 0.030000 1.420000 ( 1.414536)
defined methods, busting cache with Class.new:
1.550000 0.090000 1.640000 ( 1.638677)
method_missing dispatch, busting cache with trivial Object#extend:
1.610000 0.020000 1.630000 ( 1.640575)
method_missing dispatch, busting cache with Class.new:
1.840000 0.060000 1.900000 ( 1.889407)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment