RE: [PHP4BETA] compiler ?
| From: | Sander Pilon | Date: | Sat, 31 Jul 1999 10:14:10 +0000 |
| Subject: | RE: [PHP4BETA] compiler ? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3005@lists.php.net to get a copy of this message | ||
> >
> >So, what'll it be? Faster, or not?
>
> I dunno, maybe Im just understanding this wrong.
> Use of the script-file compiler may result in speed enhancement, but speed
> improvements were not involved in *_the entire idea_* of it. The
> idea of it
> is to render one's code proprietary (unreadable to end-users). This has
> nothing to do with the *optimizing* compiler, which is not the same as the
> script->file compiler.
>
> Is my understanding of it... foo->bar?
>
Well, also this is not entirely in line with statements made on the PHP3
list, if I'm not mistaking.
Yes, the compiler does compile script -> binary. And no, AFAIK, the main
purpose of that thing is not to render code propriatary. In fact, the
decoder (PHP) would be freely available, so anyone with naughty intentions
and a bit of a brain could figure out what you are doing.
What I *THINK* the thing was doing, but I'm not sure now, is that it parses
the script and runs an optimizer over the code, similar to GCC and MSVC
optimizers or something. What you get is a binary with optimized binary
code, wich doesnt have to be parsed anymore. That it isnt in human readable
form, and is difficult to decompile, is a sideeffect - not a design goal.
Speed increasments are to be expected in two places, the 'pre-parsing'
(maybe minimal) and the actual code optimisation.
Maybe someone from the Zend team can clear this up for the rest of eternity
and tell us what the optimizer does, and what it does not.
Sander