Re: Switch Table Extension for PHP
| From: | Dmitry Stogov | Date: | Fri, 01 Aug 2008 11:32:58 +0000 |
| Subject: | Re: Switch Table Extension for PHP | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39534@lists.php.net to get a copy of this message | ||
Please note that the extension modifies op_array and run-time and it
definitely will break opcode caches. However, it is probably possible to
reimplement it on compiler level (may be with new opcode).
Thanks. Dmitry.
Marcus Boerger wrote:
> Hello Stefan,
>
> please discuss with RMs when to merge this in. IMO such a nice locale
> improvment can go in anytime during alpha when RMs approve.
>
> marcus
>
> Wednesday, July 30, 2008, 10:18:02 PM, you wrote:
>
> Hi,
>
> for everyone interested in getting the last bit of speed out of his PHP
> I created a small extension that overrides the ZEND_CASE opcode and
> optimizes its execution.
>
> On the first execution of a switch statement it builds up a jumptable
> for all the cases and later execution of the same switch statement is
> then performed by directly looking up the jump target within the jumptable.
>
> You can find more information and the download at
>
> http://www.suspekt.org/switchtable/
>
> I am very interested how it performs with YOUR switch statements. And I
> am also very interested if its implementation unexpectedly breaks YOUR
> switch statements.
>
> Greeting,
> Stefan
> Best regards,
> Marcus