Re: [RFC] Autoloader Classmap

From: Date: Fri, 19 Mar 2021 18:40:53 +0000
Subject: Re: [RFC] Autoloader Classmap
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-113625@lists.php.net to get a copy of this message
On 19/03/2021 14:45, Nikita Popov wrote:
Could you please update the RFC with some performance numbers, including the used methodology? The number of 5% has been floating around, but it's not clear what it refers to. I'm primarily interested in end-to-end effect, e.g. on the symfony demo project.
I have updated the RFC with the following: Testing suggests that autoloading through an internal classmap delivers around 5% performance increase vs a userland function call (e.g. composer). This is 5% of the cost of the autoloading, and not the execution as a whole. Testing was performed by creating 50,000 empty classes each in an individual file, and then autoloading every one of them in a loop. Amount of classes was purely to help reduce noise. Average for internal classmap was 0.295 vs 0.313 for spl_autoload_register representing 5.9% difference (in autoload performance only).
I appreciate this is a small amount. If internals feels the additional code is not worth it for such a small gain, I have no issue at all with the RFC being rejected. Mark Randall

Thread (26 messages)

« previous php.internals (#113625) next »