2 ms·
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
by rexreed 15y ago
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?
- bkrausz 15y agoYes, __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.