__autoload vs. require_once
6.12.2006
Yesterday I read in Lukas Blog that __autoload is bad for bytecode caches. As I am currently in the optimizing phase of a project I gave it try.
I used __autoload for everything until now. I then removed __autoload and added the “old style” require_once calls.
I testet the app by fetching the start page 100 times on a freshly started apache 2.2 with mod_php 5.2.0 and apc 3.0.12.
The speed increase was about 4%.
For me the speed gain does not legitimate the loss in code quality.





Dein Kommentar