Skip to content

Instantly share code, notes, and snippets.

@thijsc
Created December 6, 2017 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thijsc/6b980462bd54f4d9b7b20a95b3742afb to your computer and use it in GitHub Desktop.
Save thijsc/6b980462bd54f4d9b7b20a95b3742afb to your computer and use it in GitHub Desktop.
Naive Ruby backtrace benchmark
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