![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
Re^4: To Single Quote or to Double Quote: a benchmarkby Anonymous Monk |
on Feb 03, 2005 at 10:05 UTC ( #427566=note: print w/replies, xml ) | Need Help?? |
You see a consistent win for single quotes,Actually, I don't. In 2 out of the 5 benchmarks, I see "double no $" beat "single no $". The fact that "double" is slower than "single" comes partially because "single" is one character shorter than "double" (if I add a single space to "single", it takes about 3% longer), and for the rest because processing a backslash in a double quoted string means checking more cases than in a single quoted string.
In Section
Seekers of Perl Wisdom
|
|