in reply to Re^2: Differences between " " and ' '?
in thread Differences between " " and ' '?

Your post seemed to be incorrect. I don't believe you are interpreting the output in the right fashion. The double still shows up as being FASTER, abnormally faster with your example.

use warnings; use Benchmark("cmpthese"); cmpthese(-1, { "double", q !eval q {$a = "this is a string" x 10}!, 'single', q !eval q {$b = 'this is a string' x 10}!, });

Not just did it show a speed increase but 46%, a quite significant one:

Rate double single
double 39422/s -- -31%
single 57420/s 46% --


Evan Carroll
www.evancarroll.com

Replies are listed 'Best First'.
Re^4: Differences between " " and ' '?
by pg (Canon) on Jul 31, 2005 at 20:23 UTC

    I was correct. The problem is that you only ran that program once. The whole point in my post and the other thread Tanktalus mentioned is that, if you ran exactly the same testing multiple times, neither double or single wins consistently.

    My testing environment is Xp, Perl 5.8.4

      It wouldn't make sense for double to ever win. There is another factor your failing to consider... CPU usage, entropy etc.