Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm trying to understand the metrics here. Doesn't the first test show that _autoload is actually much faster than require or require_once?

require_once: 1579 require: 1318 __autoload: 578

The second test shows a similar result:

require_once: 1689 require: 1382 __autoload: 658

Am I missing something here?



Yes, __autoload is much faster, because it only ends up loading ~5 of the files. Previously we had included 30 files by default, and even though __autoload is slower on a file-by-file basis, the savings on the files we didn't need to load at all made it very worthwhile.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: