From: Christian Neukirchen Date: 2006-09-26T05:00:17+09:00 Subject: Re: "" vs '' James Edward Gray II writes: > On Sep 25, 2006, at 12:03 PM, Rich Morin wrote: > >> Use '' by default: >> >> - It's less work for the interpreter. > > What makes you say this? > > #!/usr/bin/env ruby -w > > require "benchmark" > > TESTS = 1_000_000 > Benchmark.bmbm(10) do |results| > results.report("double:") { TESTS.times { "James" } } > results.report("single:") { TESTS.times { 'James' } } > end You really should compare the parse-trees of these before even trying to benchmark it that way... > James Edward Gray II -- Christian Neukirchen http://chneukirchen.org