Created
December 6, 2017 12:12
-
-
Save thijsc/6b980462bd54f4d9b7b20a95b3742afb to your computer and use it in GitHub Desktop.
Naive Ruby backtrace benchmark
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
require "benchmark" | |
puts(Benchmark.measure { | |
1_000_000.times do | |
1 + 1 | |
end | |
}) | |
puts(Benchmark.measure { | |
1_000_000.times do | |
Thread.current.backtrace | |
1 + 1 | |
end | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment