Created
March 2, 2012 15:14
-
-
Save ku1ik/1959111 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
ruby-1.9.2-p290 :005 > a = 'foo'; time(10000000) { "jola #{a} misio" } | |
user system total real | |
8.260000 0.010000 8.270000 ( 8.273313) | |
=> "jola foo misio" | |
ruby-1.9.2-p290 :006 > a = 'foo'; time(10000000) { "jola : misio".gsub(':', a) } | |
user system total real | |
48.940000 0.070000 49.010000 ( 49.054449) | |
=> "jola foo misio" | |
ruby-1.9.2-p290 :007 > l = lambda { |a| "jola #{a} misio" } | |
=> #<Proc:0x000000028f6f68@(irb):7 (lambda)> | |
ruby-1.9.2-p290 :008 > a = 'foo'; time(10000000) { l[a] } | |
user system total real | |
9.680000 0.020000 9.700000 ( 9.703990) | |
=> "jola foo misio" | |
ruby-1.9.2-p290 :009 > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment