Re: Re: [PHP3] VBS/Perl/PHP Performance Test
| From: | Andi Gutmans | Date: | Fri, 24 Dec 1999 14:23:20 +0000 |
| Subject: | Re: Re: [PHP3] VBS/Perl/PHP Performance Test | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-13996@lists.php.net to get a copy of this message | ||
At 08:19 PM 12/23/99 -0600, Andrei Zmievski wrote:
On Thu, 23 Dec 1999, Rasmus Lerdorf wrote: The preg_replace() function should be quite a bit faster. Try that instead. The hsregex library is starting to show its age. The PCRE library is quicker. Yes, the actual regex matching code is quite faster. The code that does replacement though was mostly taken from ereg_replace(), with some modifications for the PCRE stuff. I don't know right now how it can be optimized more.I think the main reason why Perl is so much faster than ASP & PHP in that benchmark is because regular expressions are part of the language syntax. Thus the regex's are compiled at compile time. In PHP, although there is a regex cache for PCRE regex's there is more of an overhead as they aren't embedded as part of the language. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/