Created
July 31, 2014 09:22
-
-
Save AJFaraday/e1c7b091567b6a8b38d9 to your computer and use it in GitHub Desktop.
This file contains 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
irb(main):024:0> Benchmark.measure{1_000_000.times{'hello'}} | |
=> 0.210000 0.000000 0.210000 ( 0.202565) | |
irb(main):025:0> Benchmark.measure{1_000_000.times{:hello}} | |
=> 0.050000 0.000000 0.050000 ( 0.046498) | |
irb(main):026:0> Benchmark.measure{10_000_000.times{'hello'}} | |
=> 1.500000 0.000000 1.500000 ( 1.499443) | |
irb(main):027:0> Benchmark.measure{10_000_000.times{:hello}} | |
=> 0.380000 0.000000 0.380000 ( 0.379270) | |
irb(main):028:0> Benchmark.measure{100_000_000.times{'hello'}} | |
=> 15.410000 0.010000 15.420000 ( 15.421837) | |
irb(main):029:0> Benchmark.measure{100_000_000.times{:hello}} | |
=> 3.790000 0.010000 3.800000 ( 3.790588) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment