Created
April 19, 2013 23:24
-
-
Save knewter/5423930 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
require 'benchmark' | |
counter = 0 | |
bm = Benchmark.measure do | |
500_000_000.times do | |
counter += 1 | |
end | |
end | |
puts counter | |
puts bm |
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
--(jadams@jibbajabba)-(12/pts/13)-(1812/19-Apr-13)-- | |
--($:~/ruby/benchmarking)ruby-head@benchmarking-- | |
$ ruby incrementing.rb | |
500000000 | |
31.800000 0.000000 31.800000 ( 31.913337) | |
--(jadams@jibbajabba)-(13/pts/13)-(1821/19-Apr-13)-- | |
--($:~/ruby/benchmarking)ruby-head@benchmarking-- | |
$ . .rvmrc | |
Using /home/jadams/.rvm/gems/jruby-1.7.3 with gemset benchmarking | |
--(jadams@jibbajabba)-(14/pts/13)-(1821/19-Apr-13)-- | |
--($:~/ruby/benchmarking)jruby-1.7.3@benchmarking-- | |
$ ruby incrementing.rb | |
500000000 | |
24.160000 0.220000 24.380000 ( 21.346000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment