Benchmarking 3 PHP Accelerators 81
jfbus writes "PHP, like all scripting languages, suffers from having to parse all script files each time a page is displayed. Accelerators (opcode caches) are necessary to speed PHP enough for large websites. Here is a benchmark of the major PHP accelerators (Zend platform, apc and eAccelerator)."
Like all scripting languages? (Score:4, Informative)
This isn't something common to all scripting languages. For example, when Python scripts are executed, they are compiled to byte-code, and the result is saved for faster execution next time. Of course, in typical web hosting situations, the web server doesn't have permission to write to the filesystem, but you can quickly and easily compile the bytecode yourself [incutio.com]. ASP.NET also compiles once only.
In fact, I believe it's an oddity of PHP that it needs add-ons in order to do this, and I think the next version of PHP will have fixed this. I don't know where they got the idea that all scripting languages must always parse the script on every invocation.
Re:Forgive me for my stupidity, (Score:2, Informative)
Turck MMCache (Score:3, Informative)
Re:Turck MMCache (Score:4, Informative)
Reincarnated here: http://eaccelerator.net/ [eaccelerator.net]
Re:Like all scripting languages? (Score:3, Informative)
Python's loading algorithm goes something like this:
Never in my time developing Python have I once encountered a problem with stale compiled objects. If your language of choice doesn't have this same functionality or its equivalent, then the problem is with the language and not the concept.
Re:"Accelerating" PHP is a waste of time (Score:3, Informative)
function Redirect($location) {
header("Location: $location");
die;
}
function MapPath($file) {
return realpath($file);
}