Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Feb 12, 2025
1 parent 2f99923 commit 72889e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions benchmarks.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
benchmark,subject,set,revs,its,mem_peak,mode,rstdev
ContainerBench,benchSequentialLookups,0,1000,5,38615152,602.48838356165,1.0041100163245
ContainerBench,benchSequentialLookups,1,1000,5,38785048,639.05279452054,1.1527420477623
ContainerBench,benchSequentialLookups,2,1000,5,38784768,628.81815264188,1.946527418935
ContainerBench,benchRandomLookups,0,1000,5,38615152,603.81157534248,1.5712579665923
ContainerBench,benchRandomLookups,1,1000,5,38785048,629.47866731898,0.90802543742988
ContainerBench,benchRandomLookups,2,1000,5,38784768,631.86806849314,0.197104084957
ContainerBench,benchRandomLookupsComposite,0,1000,5,26709168,2220.2749589041,0.9388636157521
ContainerBench,benchRandomLookupsComposite,1,1000,5,26743320,2173.362630137,0.85558407825324
ContainerBench,benchRandomLookupsComposite,2,1000,5,26743040,2193.4210450098,0.82074547614433
6 changes: 3 additions & 3 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Psr\Container\NotFoundExceptionInterface;
use Throwable;
use Yiisoft\Definitions\ArrayDefinition;
use Yiisoft\Definitions\DefinitionInterface;
use Yiisoft\Definitions\Contract\DefinitionInterface;
use Yiisoft\Definitions\DefinitionStorage;
use Yiisoft\Definitions\Exception\CircularReferenceException;
use Yiisoft\Definitions\Exception\InvalidConfigException;
Expand Down Expand Up @@ -70,12 +70,12 @@ final class Container implements ContainerInterface
private bool $useResettersFromMeta = true;

/**
* @var array<string, mixed> Normalized definitions cache
* @var array<string, mixed> Normalized definitions cache.
*/
private array $normalizedDefinitions = [];

/**
* @var int Number of normalized definitions before cache is cleared
* @var int Number of normalized definitions before the cache is cleared.
*/
private const MAX_NORMALIZED_DEFINITIONS = 100;

Expand Down

0 comments on commit 72889e7

Please sign in to comment.