Many PHP developers, myself included often mention that using PHP that is compiled statically (Apache module) is much (18-30%) faster then the shared module that is normally compiled. This is a rather unusual claim that is often met with much skepticism for a good reason, presense of pic code resulting from a shared build should not cause this, however benchmarks speaks for themselves.
Unfortunately finding hard data is rather hard since most of us are rather lazy to spend 30 mins performing the needed tests. Fortunately,
George Schlossnagle published the benchmarks he conducted on the matter that conclusively demonstrate that the the static build is much faster.
The raw benchmark data can be found
here
At this time PHP still does not have a no-pic option, so for those of you interested in getting a fair bit of performance from PHP here are the instructions.
When building PHP for Apache 1, make sure to configure PHP as a static Apache module and disable the building of CGI and CLI, you will also need to disable PEAR since is dependent on PHP-CLI being installed.
[decompress apache sources]
cd apache_dir
./configure
[decompress PHP]
cd php_dir
./configure --disable-cli --disable-cgi --without-pear --with-apache=/path/to/ap1/sources
make
make install
cd back_to_apache_source_dir
./configure --activate-module=src/modules/php4/libphp4.a your_usual_ap_config_flags
make
make install
At the end of this process your httpd binary will have PHP support built-in and you'll have another 18-30% performance gained. The only minus of this approach is that you will need to rebuild Apache and PHP anytime either is upgraded. This will hopefully be resolved when no-pic option is added to PHP.