On 17/03/2021 01:29, Mike Schinkel wrote:
Would core not be able to implement an add() more efficiently than a 
get()/set()?  I am especially concerned the get()/set() approach might require 
allocating memory for the returned array for every get().

There is no good way to add features to mutate the existing array without causing a net performance penalty considering the approximately 5% boost this RFC provides vs a userland function.

It is a micro-optimization written exclusively with a single large pre-generated list in mind.

It will be left to the voters to decide if 5% of an extremely common operation is worth the few dozen lines of code required.

Mark Randall

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

Reply via email to