Created
September 30, 2015 13:36
-
-
Save tinogomes/801d6ac730676b6b4391 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/ips' | |
GC.disable | |
CYCLES = 1_000_000 | |
SINGLE_QUOTES = 'string' | |
DOUBLE_QUOTES = "string" | |
Benchmark.ips do |x| | |
x.report('double quotes') { b = DOUBLE_QUOTES } | |
x.report('single quotes') { a = SINGLE_QUOTES } | |
x.compare! | |
end |
Author
tinogomes
commented
Sep 30, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment