"Using __autoload and require_once basically destroys any advantage apc is likely to bring you. Mainly because you move the compilation sequence into mid-runtime land, where the engine stops execution and proceeds to compile stuff. "
I can't make any sense out of it, frankly. Unless APC is totally broken (which I believe it's not, otherwise we would know it before) it doesn't make any difference how you call require_once - from autoload or otherwise. Also, the phrase "you move the compilation sequence into mid-runtime land" doesn't make absolutely any sense, since any compilation in PHP is in "mid-runtime land" - all compilations besides top script are done by runtime engine executing include or require opcode, and the top script does virtually the same only without the actual opcode.
I think what Rasmus is talking about is compile-time binding versus runtime binding, but it's not that big a difference (definitely not even close to "destroying any advantage", since the advantage is because of the absence of the disk operations and not because of compile-time binding) and anyway it only comes into play if you, for example, inherit from autoloaded class (then compiler can't runtime-bind the inherited class) but if you use autoloading on new(), etc. it doesn't matter at all. Also, that has nothing to do with require_once - basically, for require_once the slowdown comes from having to resolve the full path of the file (since we should actually know the full true path to know to load it only opce) - realpath cache present in 5.2 should make it much cheaper. Anyway, even with require_once the benefits far outweigh the small speedup you are getting by using require and potentially saving realpath() call - unless you are running super-performance-critical site that you should positively squeeze out each and every single function call and system call even if it may make your code less stable and more ugly. Even then with realpath() cache you probably don't have any more to squeeze...
-- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/
