You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think "test3.php" benchmarks what you think it does - at least, after looking at implementations for pimple and php-di, in both cases, as far as I can tell, you're not benchmarking the time taken to create the object graph at all.
For instance, here in php-di/test3.php you've already resolved the object graph when you triggered the autoloader. Since you continue benchmarking the same container, the object graph has already been resolved, so all it's doing in the loop, is a key lookup.
pimple/test3.php is a different benchmark entirely - here, you're actually creating a new container every time, inside the loop, triggering an actual resolve of the object graph.
league/test3.php also appears to resolve the object graph outside of the loop.
I'm trying to write the benchmark for my own container, but how is it supposed to work? Which of the benchmarks should I be using as point of reference?
The text was updated successfully, but these errors were encountered:
I don't think "test3.php" benchmarks what you think it does - at least, after looking at implementations for
pimple
andphp-di
, in both cases, as far as I can tell, you're not benchmarking the time taken to create the object graph at all.For instance, here in php-di/test3.php you've already resolved the object graph when you triggered the autoloader. Since you continue benchmarking the same container, the object graph has already been resolved, so all it's doing in the loop, is a key lookup.
pimple/test3.php is a different benchmark entirely - here, you're actually creating a new container every time, inside the loop, triggering an actual resolve of the object graph.
league/test3.php also appears to resolve the object graph outside of the loop.
I'm trying to write the benchmark for my own container, but how is it supposed to work? Which of the benchmarks should I be using as point of reference?
The text was updated successfully, but these errors were encountered: