> The overhead is practically unmeasurable unless we are filling the object table with these things
I think that's typically how one would measure complexity and regardless of JIT I think it introduces some artificial cost.
Re:Algorithms in PHP: Deques
by withinboredom on Tuesday September 13, 2022 @12:29PM
(#32826495)
Sure, it adds a cost, but it’s infinitesimal compared to the cost of what we are measuring.
The purpose is to illustrate what we are doing and setting the stage for later implementations. The overhead is practically unmeasurable unless we are filling the object table with these things (we are not).
Property lookup and function calls are pretty darn fast in PHP, especially with JIT enabled.