Re: PHP to C translator
| From: | (Richard Lynch) | Date: | Thu, 06 Jul 2000 01:18:18 +0000 |
| Subject: | Re: PHP to C translator | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5133@lists.php.net to get a copy of this message | ||
In article <39635EC0.811CD793@di.uoa.gr>, rouvas@di.uoa.gr (Rouvas
Stathis) wrote:
> I have written a bunch of PHP3 scripts that run in stand-alone mode
> (cgi).
> All goes extremely well.
> Unfortunately they take an inordinate ammount of time to finish.
What do the scripts do?...
What part of the scripts is taking all the time?
Do some metering and find out where all the time is going...
The Usual Suspects:
Opening database connection over and over in one script.
Long loops to iterate through stuff an SQL query could have filtered.
Creating buttloads of small, silly class objects because you like OO.
> I haven't tried PHP4 yet, but does anyone know if a translator from PHP
> to C in a Linux environment is available?
I don't think any such beast exists...
The closest would be the forth-coming Zend compiler...
There's a Zend Optimizer (free) that might help in PHP4...
You may run across documentation for a pre-tokenizer in php3 (php
--help). Don't bother with it. It doesn't make it faster: It doesn't
even work any more. The PHP team thought it would help speed things up to
tokenize (the first step of compilation) but it didn't really help, so
nobody keeps that code working.
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)