From: Travis Whitton Date: 2003-01-25T04:29:28+09:00 Subject: Re: Single vs double quotes and performance? I've often wondered the same thing. The difference doesn't appear to be much: require 'benchmark' include Benchmark data = ((0..9).to_a.to_s) * 2000000 double = %!"#{data}"! single = "'#{data}'" bm do |x| x.report("double:") { eval(double) } x.report("single:") { eval(single) } end user system total real double: 0.560000 0.050000 0.610000 ( 0.614154) single: 0.510000 0.060000 0.570000 ( 0.577753) 20,000,000 characters have to be scanned to do the eval, and the difference is miniscule. I ran this test ten times, and the single was always faster, but it's such a negligible difference that it doesn't matter. - Travis Whitton