Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tally.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

return Configuration::create()
->withPaths([__DIR__ . '/tests/bench'])
// bin/phpstan restarts PHP with these OPcache settings, the benchmarks run without the restart
->withIniEntries([...OpcacheSettings::getIniEntries(), 'memory_limit=-1'])
// bin/phpstan restarts PHP with these OPcache settings, the benchmarks run without the restart.
// bin/phpstan also calls gc_disable(): with the cycle collector on, what the setup allocated
// decides whether a collection falls into the counted call, and it never runs in an analysis.
->withIniEntries([...OpcacheSettings::getIniEntries(), 'memory_limit=-1', 'zend.enable_gc=0'])
// The slowest benchmark takes a few seconds natively and about 13 minutes under the simulation.
// One stuck in a loop fails in the native run, one that regresses far beyond that fails as not
// measured instead of holding up its shard.
Expand Down
12 changes: 6 additions & 6 deletions tests/bench/AcceptsResultBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ public function boot(int $results): void
}

#[DataProvider(method: 'results')]
#[ExpectedFor(dataSet: 'results-16', instructions: '16.91K', cycles: '53.31K', memory: '1.180KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '212.4K', cycles: '362.0K', memory: '24.24KiB')]
#[ExpectedFor(dataSet: 'results-16', instructions: '17.49K', cycles: '53.87K', memory: '1.180KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '222.6K', cycles: '356.3K', memory: '24.24KiB')]
public function benchMaxMin(int $results): AcceptsResult
{
return AcceptsResult::maxMin(...$this->results);
}

#[DataProvider(method: 'results')]
#[ExpectedFor(dataSet: 'results-16', instructions: '18.73K', cycles: '61.35K', memory: '1.547KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '227.3K', cycles: '392.4K', memory: '32.30KiB')]
#[ExpectedFor(dataSet: 'results-16', instructions: '19.23K', cycles: '61.64K', memory: '1.547KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '236.2K', cycles: '382.8K', memory: '32.30KiB')]
public function benchExtremeIdentity(int $results): AcceptsResult
{
return AcceptsResult::extremeIdentity(...$this->results);
Expand All @@ -71,8 +71,8 @@ public function benchExtremeIdentity(int $results): AcceptsResult
* StringType::accepts() accepts each constant string of the union.
*/
#[DataProvider(method: 'results')]
#[ExpectedFor(dataSet: 'results-16', instructions: '43.10K', cycles: '113.9K', memory: '1.547KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '557.0K', cycles: '736.1K', memory: '32.30KiB')]
#[ExpectedFor(dataSet: 'results-16', instructions: '47.12K', cycles: '121.3K', memory: '1.914KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '618.6K', cycles: '789.3K', memory: '40.35KiB')]
public function benchStringAcceptsUnion(int $results): AcceptsResult
{
return $this->string->accepts($this->union, true);
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/AccessoryArrayListTypeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function boot(): void
$this->list->accepts($this->array, true);
}

#[Expected(instructions: '1.805M', cycles: '1.869M', memory: '472B')]
#[Expected(instructions: '1.858M', cycles: '1.904M', memory: '472B')]
public function benchIsSuperTypeOf(): IsSuperTypeOfResult
{
[$list, $array] = $this->types();
Expand Down
4 changes: 2 additions & 2 deletions tests/bench/ArrayTypeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function boot(): void
/**
* array<int, mixed> may be a list, which takes two comparisons of its key type to find out.
*/
#[Expected(instructions: '616.4K', cycles: '654.3K', memory: '376B')]
#[Expected(instructions: '630.3K', cycles: '655.0K', memory: '376B')]
public function benchIsList(): TrinaryLogic
{
$result = TrinaryLogic::createNo();
Expand All @@ -52,7 +52,7 @@ public function benchIsList(): TrinaryLogic
* The constructor turns a benevolent (int|string) key into mixed, which other key types do not
* need to be described for.
*/
#[Expected(instructions: '1.699M', cycles: '1.749M', memory: '416B')]
#[Expected(instructions: '1.664M', cycles: '1.697M', memory: '416B')]
public function benchConstruct(): Type
{
$keyType = IntegerRangeType::fromInterval(0, 100);
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/BetterReflectionSourceLocatorFactoryBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function boot(): void
/**
* Every process creates the source locator when it boots, also one that never locates a class.
*/
#[Expected(instructions: '2.283K', cycles: '16.32K', memory: '1.328KiB')]
#[Expected(instructions: '2.184K', cycles: '16.01K', memory: '1.328KiB')]
public function benchCreate(): SourceLocator
{
if ($this->factory === null) {
Expand Down
6 changes: 3 additions & 3 deletions tests/bench/ClassReflectionBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ public function doubled(array $values): array
/**
* Asking again for a method answers from the cache filled by the first call.
*/
#[Expected(instructions: '2.194K', cycles: '17.03K', memory: '40B')]
#[Expected(instructions: '2.136K', cycles: '17.24K', memory: '40B')]
public function benchGetMethodAgain(): ExtendedMethodReflection
{
return $this->class()->getMethod('doubled', new OutOfClassScope());
}

#[Expected(instructions: '2.515K', cycles: '21.25K', memory: '40B')]
#[Expected(instructions: '2.457K', cycles: '21.44K', memory: '40B')]
public function benchGetPropertyAgain(): ExtendedPropertyReflection
{
// @phpstan-ignore method.deprecated (the method the cache early return is in)
Expand All @@ -87,7 +87,7 @@ public function benchGetPropertyAgain(): ExtendedPropertyReflection
/**
* The hottest call on the class, memoized since 2.2.14.
*/
#[Expected(instructions: '1.016K', cycles: '8.566K', memory: '0B')]
#[Expected(instructions: '995', cycles: '8.465K', memory: '0B')]
public function benchGetName(): string
{
return $this->class()->getName();
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/ComposerHelperBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function boot(): void
*
* @return array<string, mixed>|null
*/
#[Expected(instructions: '1.174K', cycles: '13.64K', memory: '0B')]
#[Expected(instructions: '1.146K', cycles: '13.57K', memory: '0B')]
public function benchGetComposerConfigAgain(): ?array
{
return ComposerHelper::getComposerConfig($this->root);
Expand Down
4 changes: 2 additions & 2 deletions tests/bench/ConstantArrayTypeAcceptsBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function boot(int $keys): void
}

#[DataProvider(method: 'keys')]
#[ExpectedFor(dataSet: 'keys-16', instructions: '2.879M', cycles: '4.157M', memory: '18.22KiB')]
#[ExpectedFor(dataSet: 'keys-128', instructions: '22.85M', cycles: '30.77M', memory: '123.5KiB')]
#[ExpectedFor(dataSet: 'keys-16', instructions: '1.933M', cycles: '2.865M', memory: '17.70KiB')]
#[ExpectedFor(dataSet: 'keys-128', instructions: '15.28M', cycles: '20.69M', memory: '123.0KiB')]
public function benchAcceptsSharedValueType(int $keys): AcceptsResult
{
if ($this->accepting === null || $this->accepted === null) {
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/ConstantStringTypeDescribeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function boot(): void
/**
* Strings already described, as the members of a union of an enum's values are again and again.
*/
#[Expected(instructions: '513.6K', cycles: '726.7K', memory: '0B')]
#[Expected(instructions: '525.1K', cycles: '733.0K', memory: '0B')]
public function benchDescribeAgain(): string
{
$description = '';
Expand Down
4 changes: 2 additions & 2 deletions tests/bench/EnumTypesBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function benchUnionWithIntersection(): Type
/**
* @return list<Type>
*/
#[Expected(instructions: '804.4K', cycles: '1.086M', memory: '40.11KiB')]
#[Expected(instructions: '826.1K', cycles: '1.089M', memory: '40.11KiB')]
public function benchUnionTypeGetFiniteTypes(): array
{
if ($this->union === null) {
Expand All @@ -83,7 +83,7 @@ public function benchUnionTypeGetFiniteTypes(): array
*
* @return list<Type>
*/
#[Expected(instructions: '1.121M', cycles: '1.668M', memory: '72.42KiB')]
#[Expected(instructions: '1.148M', cycles: '1.674M', memory: '72.42KiB')]
public function benchIntersectionTypeGetFiniteTypes(): array
{
if ($this->intersection === null) {
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/FileCacheStorageBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function boot(int $entries): void
*/
#[DataProvider(method: 'entries')]
#[ExpectedFor(dataSet: 'entries-100', instructions: '234.2K', cycles: '550.6K', memory: '17.29KiB')]
#[ExpectedFor(dataSet: 'entries-10000', instructions: '19.15M', cycles: '32.40M', memory: '1.345MiB')]
#[ExpectedFor(dataSet: 'entries-10000', instructions: '18.84M', cycles: '29.57M', memory: '1.345MiB')]
public function benchSave(int $entries): void
{
if ($this->storage === null) {
Expand Down
4 changes: 2 additions & 2 deletions tests/bench/GenericObjectTypeCheckBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public function boot(int $keys): void
* @return list<mixed>
*/
#[DataProvider(method: 'keys')]
#[ExpectedFor(dataSet: 'keys-16', instructions: '46.09K', cycles: '97.47K', memory: '0B')]
#[ExpectedFor(dataSet: 'keys-64', instructions: '174.5K', cycles: '291.4K', memory: '0B')]
#[ExpectedFor(dataSet: 'keys-16', instructions: '47.56K', cycles: '98.08K', memory: '0B')]
#[ExpectedFor(dataSet: 'keys-64', instructions: '180.4K', cycles: '290.0K', memory: '0B')]
public function benchCheckTypeWithoutClasses(int $keys): array
{
if ($this->type === null) {
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/HashFunctionsReturnTypeExtensionBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class HashFunctionsReturnTypeExtensionBench
* The container creates the extension for every analysis, also of code that calls no hash function.
* Since 2.3.0 its constructor takes no PHP version, PHP ignores the argument there.
*/
#[Expected(instructions: '1.640K', cycles: '2.210K', memory: '136B')]
#[Expected(instructions: '1.596K', cycles: '1.996K', memory: '136B')]
public function benchCreate(): HashFunctionsReturnTypeExtension
{
// @phpstan-ignore new.noConstructor (2.2.13 to 2.2.17 take the PHP version)
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/InitializerExprTypeResolverBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function benchTernary(int $items): Type
*/
#[DataProvider(method: 'items')]
#[ExpectedFor(dataSet: 'items-8', instructions: '234.4K', cycles: '443.2K', memory: '10.89KiB')]
#[ExpectedFor(dataSet: 'items-128', instructions: '11.05M', cycles: '12.69M', memory: '143.9KiB')]
#[ExpectedFor(dataSet: 'items-128', instructions: '11.38M', cycles: '12.99M', memory: '143.9KiB')]
public function benchUnpackStringKeys(int $items): Type
{
if ($this->unpack === null) {
Expand Down
4 changes: 2 additions & 2 deletions tests/bench/IntersectionTypeQueriesBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function boot(): void
$this->string->describe(VerbosityLevel::precise());
}

#[Expected(instructions: '349.9K', cycles: '365.6K', memory: '0B')]
#[Expected(instructions: '363.9K', cycles: '376.6K', memory: '0B')]
public function benchIsOffsetAccessible(): TrinaryLogic
{
if ($this->array === null) {
Expand All @@ -75,7 +75,7 @@ public function benchIsOffsetAccessible(): TrinaryLogic
return $result;
}

#[Expected(instructions: '1.180M', cycles: '1.199M', memory: '0B')]
#[Expected(instructions: '1.207M', cycles: '1.222M', memory: '0B')]
public function benchDescribe(): string
{
if ($this->string === null) {
Expand Down
16 changes: 8 additions & 8 deletions tests/bench/IsSuperTypeOfResultBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ public function boot(int $results): void
}

#[DataProvider(method: 'results')]
#[ExpectedFor(dataSet: 'results-16', instructions: '17.77K', cycles: '54.47K', memory: '1.102KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '234.9K', cycles: '392.2K', memory: '24.16KiB')]
#[ExpectedFor(dataSet: 'results-16', instructions: '18.40K', cycles: '55.15K', memory: '1.102KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '245.2K', cycles: '391.9K', memory: '24.16KiB')]
public function benchMaxMin(int $results): IsSuperTypeOfResult
{
return IsSuperTypeOfResult::maxMin(...$this->results);
}

#[DataProvider(method: 'results')]
#[ExpectedFor(dataSet: 'results-16', instructions: '19.58K', cycles: '61.75K', memory: '1.469KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '249.9K', cycles: '422.3K', memory: '32.22KiB')]
#[ExpectedFor(dataSet: 'results-16', instructions: '20.14K', cycles: '62.16K', memory: '1.469KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '259.0K', cycles: '417.9K', memory: '32.22KiB')]
public function benchExtremeIdentity(int $results): IsSuperTypeOfResult
{
return IsSuperTypeOfResult::extremeIdentity(...$this->results);
Expand All @@ -83,8 +83,8 @@ public function benchExtremeIdentity(int $results): IsSuperTypeOfResult
* StringType::isSuperTypeOf() is asked about each constant string of the union.
*/
#[DataProvider(method: 'results')]
#[ExpectedFor(dataSet: 'results-16', instructions: '41.64K', cycles: '108.7K', memory: '1.469KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '548.1K', cycles: '720.9K', memory: '32.22KiB')]
#[ExpectedFor(dataSet: 'results-16', instructions: '45.70K', cycles: '116.1K', memory: '1.836KiB')]
#[ExpectedFor(dataSet: 'results-256', instructions: '609.3K', cycles: '776.2K', memory: '40.27KiB')]
public function benchStringIsSuperTypeOfUnion(int $results): IsSuperTypeOfResult
{
return $this->string->isSuperTypeOf($this->union);
Expand All @@ -94,8 +94,8 @@ public function benchStringIsSuperTypeOfUnion(int $results): IsSuperTypeOfResult
* Each accessory type is asked about each constant string.
*/
#[DataProvider(method: 'results')]
#[ExpectedFor(dataSet: 'results-16', instructions: '262.0K', cycles: '350.0K', memory: '496B')]
#[ExpectedFor(dataSet: 'results-256', instructions: '4.107M', cycles: '4.341M', memory: '496B')]
#[ExpectedFor(dataSet: 'results-16', instructions: '267.5K', cycles: '342.9K', memory: '496B')]
#[ExpectedFor(dataSet: 'results-256', instructions: '4.198M', cycles: '4.439M', memory: '496B')]
public function benchAccessoriesIsSuperTypeOf(int $results): int
{
return self::accessoriesIsSuperTypeOf(self::accessories(), $this->strings);
Expand Down
8 changes: 4 additions & 4 deletions tests/bench/IsSuperTypeOfResultOperationsBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function boot(): void
$this->no = new IsSuperTypeOfResult(TrinaryLogic::createNo(), []);
}

#[Expected(instructions: '3.151M', cycles: '3.208M', memory: '576B')]
#[Expected(instructions: '3.221M', cycles: '3.262M', memory: '576B')]
public function benchAnd(): IsSuperTypeOfResult
{
$result = $this->yes;
Expand All @@ -40,7 +40,7 @@ public function benchAnd(): IsSuperTypeOfResult
return $result;
}

#[Expected(instructions: '3.151M', cycles: '3.209M', memory: '576B')]
#[Expected(instructions: '3.221M', cycles: '3.263M', memory: '576B')]
public function benchOr(): IsSuperTypeOfResult
{
$result = $this->no;
Expand All @@ -51,7 +51,7 @@ public function benchOr(): IsSuperTypeOfResult
return $result;
}

#[Expected(instructions: '5.538M', cycles: '5.600M', memory: '792B')]
#[Expected(instructions: '5.687M', cycles: '5.732M', memory: '792B')]
public function benchMaxMin(): IsSuperTypeOfResult
{
$result = $this->no;
Expand All @@ -62,7 +62,7 @@ public function benchMaxMin(): IsSuperTypeOfResult
return $result;
}

#[Expected(instructions: '1.807M', cycles: '1.851M', memory: '144B')]
#[Expected(instructions: '1.848M', cycles: '1.878M', memory: '144B')]
public function benchNegate(): IsSuperTypeOfResult
{
$result = $this->no;
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/LoaderFactoryBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function boot(): void
*
* @return mixed[]
*/
#[Expected(instructions: '531.6K', cycles: '1.005M', memory: '37.03KiB')]
#[Expected(instructions: '426.2K', cycles: '772.1K', memory: '22.99KiB')]
public function benchLoadConfigAgain(): array
{
if ($this->loaderFactory === null) {
Expand Down
4 changes: 2 additions & 2 deletions tests/bench/MutatingScopeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function benchPushInFunctionCallGetType(): Type
/**
* A scalar's type is not stored (#4663).
*/
#[Expected(instructions: '3.965K', cycles: '23.76K', memory: '176B')]
#[Expected(instructions: '3.818K', cycles: '23.37K', memory: '176B')]
public function benchSpecifyScalarType(): MutatingScope
{
return $this->scope()->specifyExpressionType(new String_('x'), new StringType(), new StringType(), TrinaryLogic::createYes());
Expand Down Expand Up @@ -178,7 +178,7 @@ public function benchAssignPropertyFetch(): MutatingScope
/**
* Finds the expressions on $this by their keys, not by searching them (#4697).
*/
#[Expected(instructions: '66.12K', cycles: '169.7K', memory: '16.61KiB')]
#[Expected(instructions: '67.85K', cycles: '171.2K', memory: '16.61KiB')]
public function benchRestoreThis(): MutatingScope
{
$scope = $this->scope();
Expand Down
4 changes: 2 additions & 2 deletions tests/bench/MutatingScopeBranchMergeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public function boot(string $shape, int $variables): void
#[ExpectedFor(dataSet: 'absorbed-targets-16', instructions: '3.036M', cycles: '4.672M', memory: '58.13KiB')]
#[ExpectedFor(dataSet: 'differing-unions-4', instructions: '3.576M', cycles: '4.634M', memory: '74.34KiB')]
#[ExpectedFor(dataSet: 'differing-unions-16', instructions: '16.78M', cycles: '20.46M', memory: '599.2KiB')]
#[ExpectedFor(dataSet: 'maybe-defined-64', instructions: '747.8K', cycles: '1.081M', memory: '18.58KiB')]
#[ExpectedFor(dataSet: 'maybe-defined-64', instructions: '764.0K', cycles: '1.072M', memory: '18.58KiB')]
#[ExpectedFor(dataSet: 'one-sided-64', instructions: '1.405M', cycles: '2.004M', memory: '50.22KiB')]
#[ExpectedFor(dataSet: 'shared-holders-16', instructions: '153.0K', cycles: '400.9K', memory: '9.445KiB')]
#[ExpectedFor(dataSet: 'shared-holders-256', instructions: '1.372M', cycles: '2.123M', memory: '121.9KiB')]
#[ExpectedFor(dataSet: 'shared-holders-256', instructions: '1.404M', cycles: '2.122M', memory: '121.9KiB')]
public function benchMergeWith(string $shape, int $variables): MutatingScope
{
if ($this->ours === null || $this->theirs === null) {
Expand Down
6 changes: 4 additions & 2 deletions tests/bench/MutatingScopeExpressionsBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@
use SplQueue;
use SplStack;
use Tally\Attribute\Before;
use Tally\Attribute\Constant;
use Tally\Attribute\DataProvider;
use Tally\Attribute\Linear;
use Tally\Attribute\Logarithmic;
use Tally\Meter;
use Tally\ScratchDirectory;
use function count;
Expand Down Expand Up @@ -100,7 +102,7 @@ public function benchAfterOpenSslAndClearstatcacheCall(int $expressions): Mutati
* Removing never from an expression changes nothing and does not need its type.
*/
#[DataProvider(method: 'expressions')]
#[Linear(size: 'expressions')]
#[Constant(size: 'expressions')]
public function benchRemoveNeverFromExpression(int $expressions): MutatingScope
{
[$scope, $exprs] = $this->meter->exclude(function () use ($expressions): array {
Expand All @@ -124,7 +126,7 @@ public function benchRemoveNeverFromExpression(int $expressions): MutatingScope
* Narrowing $array['key'] also narrows $array to the types that can be accessed by an offset.
*/
#[DataProvider(method: 'expressions')]
#[Linear(size: 'expressions')]
#[Logarithmic(size: 'expressions')]
public function benchSpecifyArrayDimFetch(int $expressions): MutatingScope
{
[$scope, $exprs] = $this->meter->exclude(function () use ($expressions): array {
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/NullsafeOperatorHelperBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function benchGetNullsafeShortcircuitedExprOfEveryLevel(int $depth, bool
* Every link above a nullsafe one is rebuilt, a chain without one is returned as it is.
*/
#[DataProvider(method: 'chains')]
#[ExpectedFor(dataSet: 'innermost-nullsafe-64', instructions: '261.6K', cycles: '383.1K', memory: '9.609KiB')]
#[ExpectedFor(dataSet: 'innermost-nullsafe-64', instructions: '263.0K', cycles: '363.3K', memory: '9.609KiB')]
#[ExpectedFor(dataSet: 'without-nullsafe-64', instructions: '173.3K', cycles: '258.8K', memory: '23.87KiB')]
public function benchGetNullsafeShortcircuitedExpr(int $depth, bool $nullsafe): Expr
{
Expand Down
4 changes: 2 additions & 2 deletions tests/bench/ObjectTypeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public function boot(string $className): void
* The type was asked for its class before.
*/
#[DataProvider(method: 'classes')]
#[ExpectedFor(dataSet: 'class', instructions: '741', cycles: '6.371K', memory: '0B')]
#[ExpectedFor(dataSet: 'generic-class', instructions: '741', cycles: '6.361K', memory: '0B')]
#[ExpectedFor(dataSet: 'class', instructions: '720', cycles: '6.450K', memory: '0B')]
#[ExpectedFor(dataSet: 'generic-class', instructions: '720', cycles: '6.460K', memory: '0B')]
public function benchGetClassReflection(string $className): ?ClassReflection
{
if ($this->object === null) {
Expand Down
6 changes: 3 additions & 3 deletions tests/bench/OperatorTypeSpecifyingExtensionBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public function boot(string $extension, string $operands): void
* @param class-string<OperatorTypeSpecifyingExtension> $extension
*/
#[DataProvider(method: 'extensions')]
#[ExpectedFor(dataSet: 'bcmath-integers', instructions: '309.3K', cycles: '380.8K', memory: '0B')]
#[ExpectedFor(dataSet: 'bcmath-objects', instructions: '651.3K', cycles: '786.5K', memory: '216B')]
#[ExpectedFor(dataSet: 'gmp-integers', instructions: '294.4K', cycles: '365.1K', memory: '0B')]
#[ExpectedFor(dataSet: 'bcmath-integers', instructions: '317.4K', cycles: '383.8K', memory: '0B')]
#[ExpectedFor(dataSet: 'bcmath-objects', instructions: '665.4K', cycles: '781.7K', memory: '216B')]
#[ExpectedFor(dataSet: 'gmp-integers', instructions: '302.1K', cycles: '367.6K', memory: '0B')]
#[ExpectedFor(dataSet: 'gmp-objects', instructions: '593.5K', cycles: '718.6K', memory: '216B')]
public function benchSpecify(string $extension, string $operands): int
{
Expand Down
Loading
Loading