jamesgoode wrote:
I'm trying to write fast code, and I'm wondering which is faster,
generating strings with double quotes or single quotes - aka, $string
= "My name is $name"; or $string = 'My name is '.$name;.
There is no noticeable
Also, if you have any tips for writing fast code, please share
them :-).
Skip premature optimization altogether[1], and concentrate on programming
efficient algorithms[2][3].
[1]http://en.wikipedia.org/wiki/Optimization_(computer_science)#When_to_optimize
[2]http://en.wikipedia.org/wiki/Computational_complexity_theory
[3]http://en.wikipedia.org/wiki/Big_O_notation
In other words, how you concatenate strings won't be a bottleneck in your
application. Unindexed databases or unnefficient ways to
search/update/manipulate data will be.
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Con tecnología AMANO(tm).