Hi!

- you use an internal class many, many times (as the overhead from a
handful of invocations would be negligible)

Actually, one time is enough, as it can bring an application from essentially zero disk accesses (with bytecode caching) to multiple disk accesses (to traverse full include path to exhaust all autoloading capabilities).

- you do implement __autoload(), that __autoload() accesses the
filesystem and the result is not cached (isn't there a stat cache?) or

There's no negative autoloading cache.

- you didn't reference the class using the global namespace (IOW, "new
PDO" instead of "new \PDO")

That's how 100% of existing code is written, btw, and how 100% of existing programmers are educated.

I'd expect people who execute that kind of code and care about
performance to know that referencing internal classes in the correct
namespace is more efficient. People who don't know the difference are

How they are supposed to know that? It doesn't give any error, it doesn't give any indication anything is wrong. It's just slow. Expecting all people to scrupulously study every note in the manual is over-optimistic at best.

Perhaps the performance argument would have more weight if somebody
benchmarked the impact on an average application?

What's "average application"? There are no namespaced applications now. But you can estimate it if you take big application, run it under bytecode cache and on each use of internal class you insert, say, 5 disk accesses.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to