Re: [PHP-DEV] [PATCH] 1 small optimization and 1 cleanup

2006-12-14 Thread Ron Korving
If you have good reason to believe it will be slower, then naturaly we should forget about that patch. I don't know much about cache hitrates. The other patch removes bogus code, which should be good I reckon. If you still want the patch for PCRE though, a patch with braces follows below. - Ron

Re: [PHP-DEV] [PATCH] 1 small optimization and 1 cleanup

2006-12-14 Thread Nuno Lopes
Hi, Below are 2 patches for the latest 5.2. The first patch rewrites pcre_get_compiled_regex_ex() in ext/pcre/php_pcre.c from line 417, saving up to 3 comparison statements (?:). The second patch removes a pointless statement (setting a local variable right before a return statement) from json_

Re: [PHP-DEV] [PATCH] 1 small optimization and 1 cleanup

2006-12-14 Thread Andrei Zmievski
Sure. On Dec 14, 2006, at 9:07 AM, Ron Korving wrote: I can redo the patch if you want. I do notice the braces aren't always used in if-statements (see preg_get_backref() for a few occasions). Do you want me to repost it with braces? - Ron "Andrei Zmievski" <[EMAIL PROTECTED]> wrote in mes

Re: [PHP-DEV] [PATCH] 1 small optimization and 1 cleanup

2006-12-14 Thread Ron Korving
I can redo the patch if you want. I do notice the braces aren't always used in if-statements (see preg_get_backref() for a few occasions). Do you want me to repost it with braces? - Ron "Andrei Zmievski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On Dec 13, 2006, at 10:28 AM

Re: [PHP-DEV] [PATCH] 1 small optimization and 1 cleanup

2006-12-14 Thread Andrei Zmievski
On Dec 13, 2006, at 10:28 AM, Ron Korving wrote: + + if (pce) + { + if (extra) *extra = pce->extra; + if (preg_options) *preg_options = pce->preg_options; + if (compile_options) *compile_options = pce->compile_options; + return pce->re; } If you rewrite it, then please adhere to the cod