Updates strings speed tests
| From: | Justin Patrin | Date: | Fri, 10 Nov 2006 16:55:09 +0000 |
| Subject: | Updates strings speed tests | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-25759@lists.php.net to get a copy of this message | ||
I've updated my strings speed tests to include 2 more types of checks.
One is outer-brace interpolation with double quotes and another is
high numbers of interpolations with single quotes, double quotes, and
sprintf. I was a little shocked by the results. sprintf is a big
winner when doing lots of interpolations, especially when not using an
opcode cache (parsing of function calls is apparently faster than
single-quotes string parsing). Double quotes also win out but somewhat
later than sprintf (again, faster parsing of a single double quoted
string vs multiple single-quoted strings makes them win out faster
when not using an opcode cache).
http://pear.reversefold.com/strings/
--
Justin Patrin