Re: Compiler for the PHP code

From: Date: Tue, 19 Mar 2013 09:05:52 +0000
Subject: Re: Compiler for the PHP code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-320652@lists.php.net to get a copy of this message
Il Tue, 19 Mar 2013 08:46:22 +0000, Kevin Peterson ha scritto: > My webcode written in PHP and it is running in the interpreted way. My > problem is it is not giving the desired performance so want to try the > compiler if any. PHP gets compiled to bytecode on the server before being executed. You can cache the precompiled code with (for example) APC. Unless your code is several thousand lines of code (or your server very slow... 486-slow), the compilation phase is not that long. I think your main problem can be one of: 1- wrong algorithm 2- long waits (database, files, network, etc.) 3- heavy calculations Solutions: 1- find and use a different algorithm 2- Try to parallelize code (with gearman or similar, or via pctnl_fork) 3- rewrite the heavy functions in C, C++ or Go and compile them, then call them via PHP extensions or via gearman/fork. Bye.

« previous php.general (#320652) next »