DEV Community

loading...

Comparing PHP’s Autoload

Jorge Castro
You are free to believe in whatever you want to, me too. So, stop preaching your religion, politics, or belief. Do you have facts? Then I will listen. Do you have a personal belief? Sorry but no.
Updated on ・1 min read

Discussion (5)

Collapse
darkain profile image
Vincent Milum Jr

Woah... I've not touched Laravel in a very VERY long time and didn't realize it was still THAT slow. 200ms just for a base autoloader table? The framework I built can do an entire page render (all framework code, database transactions, HTML template processing, and outputting back to the TCP stream) in about 10ms for simple pages, and this is without any caching layers. This performance is also it running on a dual Xeon 5400 CPU (10 years ago) that uses DDR2 RAM. This just makes me want to finish the installer and bootstrapper even more so people can have a great performing PHP experience again!

Collapse
jorgecc profile image
Jorge Castro Author • Edited

200ms just for a base autoloader table?

No, it's 200ms per 1 million calls (at least in my machine, i7/64bits/ssd). However, the memory used by the table could hurt the performance. I'm not fans of Laravel but it is one (or many) of the reasons why Laravel is dog-slow.

https://cdn-images-1.medium.com/max/1600/1*zj60A7DgMAWDSMCYNm1low.png (the chart is about time, its old but its still valid)

Collapse
darkain profile image
Vincent Milum Jr

There is no such thing as "done" ;)

Collapse
veevidify profile image
V

Interesting summary.

What do you think would be a disadvantage of using AutoloadOne over Composer? Is it apparently superior in terms of generating maps optimisation?

Forem Open with the Forem app