Skip to content

Instantly share code, notes, and snippets.

@samdark
Created February 20, 2020 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samdark/93e049551b197d0f8887a2837cd61de4 to your computer and use it in GitHub Desktop.
Save samdark/93e049551b197d0f8887a2837cd61de4 to your computer and use it in GitHub Desktop.

master

PhpBench @git_tag@. Running benchmarks. Using configuration file: D:\dev\yii-dev\dev\di/phpbench.json

\Yiisoft\Di\Tests\Benchmark\ContainerBench

benchConstructStupid....................I4 [μ Mo]/r: 438.566 435.190 (μs) [μSD μRSD]/r: 9.080μs 2.07%
benchConstructSmart.....................I4 [μ Mo]/r: 470.958 468.942 (μs) [μSD μRSD]/r: 2.848μs 0.60%
benchSequentialLookups # 0..............R5 I4 [μ Mo]/r: 2,837.000 2,821.636 (μs) [μSD μRSD]/r: 34.123μs 1.20%
benchSequentialLookups # 1..............R1 I0 [μ Mo]/r: 12,253.600 12,278.859 (μs) [μSD μRSD]/r: 69.087μs 0.56%
benchRandomLookups # 0..................R5 I4 [μ Mo]/r: 3,142.200 3,111.290 (μs) [μSD μRSD]/r: 87.639μs 2.79%
benchRandomLookups # 1..................R1 I2 [μ Mo]/r: 13,298.800 13,337.170 (μs) [μSD μRSD]/r: 103.891μs 0.78%
benchRandomLookupsComposite # 0.........R1 I3 [μ Mo]/r: 3,351.600 3,389.104 (μs) [μSD μRSD]/r: 72.516μs 2.16%
benchRandomLookupsComposite # 1.........R1 I4 [μ Mo]/r: 13,528.200 13,502.881 (μs) [μSD μRSD]/r: 99.997μs 0.74%

\Yiisoft\Di\Tests\Benchmark\ContainerMethodHasBench

benchPredefinedExisting.................R1 I4 [μ Mo]/r: 0.115 0.114 (μs) [μSD μRSD]/r: 0.001μs 1.31%
benchUndefinedExisting..................R5 I4 [μ Mo]/r: 0.436 0.432 (μs) [μSD μRSD]/r: 0.008μs 1.89%
benchUndefinedNonexistent...............R5 I4 [μ Mo]/r: 0.946 0.942 (μs) [μSD μRSD]/r: 0.006μs 0.59%

8 subjects, 55 iterations, 5,006 revs, 0 rejects, 0 failures, 0 warnings (best [mean mode] worst) = 0.113 [4,483.856 4,486.051] 0.117 (μs) ⅀T: 246,612.096μs μSD/r 43.563μs μRSD/r: 1.336%

improve-di

PhpBench @git_tag@. Running benchmarks. Using configuration file: D:\dev\yii-dev\dev\di/phpbench.json

\Yiisoft\Di\Tests\Benchmark\ContainerBench

benchConstructStupid....................I4 [μ Mo]/r: 1,082.593 1,082.752 (μs) [μSD μRSD]/r: 4.933μs 0.46%
benchConstructSmart.....................I4 [μ Mo]/r: 1,131.789 1,129.065 (μs) [μSD μRSD]/r: 4.936μs 0.44%
benchSequentialLookups # 0..............I4 [μ Mo]/r: 5,206.000 5,231.319 (μs) [μSD μRSD]/r: 35.219μs 0.68%
benchSequentialLookups # 1..............I4 [μ Mo]/r: 128,858.800 128,576.468 (μs) [μSD μRSD]/r: 590.516μs 0.46%
benchRandomLookups # 0..................I4 [μ Mo]/r: 5,314.600 5,278.237 (μs) [μSD μRSD]/r: 84.001μs 1.58%
benchRandomLookups # 1..................I4 [μ Mo]/r: 132,098.800 130,956.102 (μs) [μSD μRSD]/r: 2,369.125μs 1.79%
benchRandomLookupsComposite # 0.........R5 I4 [μ Mo]/r: 6,172.000 6,071.429 (μs) [μSD μRSD]/r: 145.615μs 2.36%
benchRandomLookupsComposite # 1.........R5 I4 [μ Mo]/r: 132,770.000 132,649.890 (μs) [μSD μRSD]/r: 828.578μs 0.62%

\Yiisoft\Di\Tests\Benchmark\ContainerMethodHasBench

benchPredefinedExisting.................R5 I4 [μ Mo]/r: 0.501 0.506 (μs) [μSD μRSD]/r: 0.008μs 1.53%
benchUndefinedExisting..................R5 I4 [μ Mo]/r: 0.840 0.842 (μs) [μSD μRSD]/r: 0.004μs 0.52%
benchUndefinedNonexistent...............R5 I4 [μ Mo]/r: 1.427 1.433 (μs) [μSD μRSD]/r: 0.012μs 0.86%

8 subjects, 55 iterations, 5,006 revs, 0 rejects, 0 failures, 0 warnings (best [mean mode] worst) = 0.488 [37,512.486 37,361.640] 0.508 (μs) ⅀T: 2,063,186.754μs μSD/r 369.359μs μRSD/r: 1.026%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment