Each time code does include or require,
include_path is used to try to find file (unless its absolute path), that means if the needed
file is in the last folder in your include path, it will take the longest time to find it.
So keep your include path’s short (1 or 2 paths) and keep all your files organized if you use relative path’s.
Hybrid PSR-0 autoloader
Another thing u could do is, if you have a library, lets say zendframework
in (composer/zendframework/) instead of loading whole composer with all your packages, you should do hybrid autoloader
Instead of loading whole composer classmap, just put a symlink into your include_path to your zendframework,
if library supports PSR-0 ofc.
And we could also modify PSR-0 autoloader to work with composer more efficiently, and ONLY include composer
if class is not found without our own libraries (u dont need 100% of our composer libs on EVERY request)
optional classmap feature
lazy composer include
PHP-7 fix & error_reporting level side-effect fix
Runtime classmap generator
To get the last bits of performance (±1ms) having a classmap for your own classes w/o inventing a classmap generator
for your own (legacy) code, just autogenerate map on-fly
generates classmap on-demand
plug-in into hybrid autoloader
Update Dec 2016
Updated register_shutdown_function for high concurrent reads&writes
Update Mar 2017
Additionnal checks for written files consistency
Update Dec 2020
Fix for include_once in case file was included by some external loaders already