by BFalkner · 17y ago · 0 comments
test_str1, test_str2 = "test", "test" str = Benchmark.measure do 10_000_000.times do test_str1 == test_str2 end end.total
testsym1, testsym2 = :test, :test sym = Benchmark.measure do 10_000_000.times do testsym1 == testsym2 end end.total
Of course you might not need to create two strings, and definitely not two symbols. Somebody want to run this? (I'm on a communal computer with no Ruby.)
No comments yet.