Created
February 7, 2013 21:47
-
-
Save goshacmd/4734548 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
$ cat bm.rb | |
require './env' | |
Benchmark.bm do |x| | |
x.report('block') { OrderEvent.all.limit(100_000).map(&:total) } | |
x.report('sym') { OrderEvent.all.limit(100_000).map(:total) } | |
end | |
$ ruby bm.rb | |
user system total real | |
block 10.490000 0.240000 10.730000 ( 10.810376) | |
sym 2.490000 0.060000 2.550000 ( 2.759671) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment