Jump to content

PHP accelerator

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Demonkoryu (talk | contribs) at 12:40, 1 September 2010 (Practical benefits: code cache -> bytecode cache). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A PHP accelerator is a PHP extension designed to improve the performance of software applications written in the PHP programming language.

Operation

Most PHP accelerators work by caching the compiled bytecode of PHP scripts to avoid the overhead of parsing and compiling source code on each request (some or all of which may never even be executed). To further improve performance, the cached code is stored in shared memory and directly executed from there, minimizing the amount of slow disk reads and memory copying at runtime.

Practical benefits

A PHP accelerator typically reduces server load and increases the speed of PHP code by a factor of anywhere between 2–10 times[citation needed], depending on factors such as the inherent execution time of the PHP application and the percentage of source code actually executed on a given request. While a code optimizer may even slow down overall performance when used in isolation, it can provide an additional performance boost when coupled with a bytecode cache; as the optimization effort is performed just once.

See also