Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Improved setFactory and setAlias performance #113

Closed
wants to merge 4 commits into from

Conversation

malinink
Copy link
Contributor

@malinink malinink commented Apr 6, 2016

All discussion is in #112

Provided PR give advantages on methods:

  • setFactory is now 9x faster
  • setAlias (for not intersecting case) is 3x faster
  • all set methods that use configure

@malinink malinink changed the title Fix slow set mathods in SM Fix slow set methods in SM Apr 6, 2016
@Ocramius Ocramius added this to the 3.1.0 milestone Jun 1, 2016
@Ocramius Ocramius self-assigned this Jun 1, 2016
@Ocramius
Copy link
Member

Ocramius commented Jun 1, 2016

I manually applied some changes to this patch.

develop (patch not applied):

+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| benchmark                   | subject                          | group | params | revs | its | mem         | best        | mean        | mode        | worst       | stdev    | rstdev | diff        |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| FetchCachedServicesBench    | benchFetchFactory1               |       | []     | 1000 | 20  | 956,296b    | 2.686μs     | 2.824μs     | 2.811μs     | 2.933μs     | 0.056μs  | 1.99%  | +1.03%      |
| FetchCachedServicesBench    | benchFetchInvokable1             |       | []     | 1000 | 20  | 956,296b    | 2.791μs     | 2.902μs     | 2.878μs     | 3.033μs     | 0.070μs  | 2.42%  | +3.82%      |
| FetchCachedServicesBench    | benchFetchService1               |       | []     | 1000 | 20  | 956,296b    | 2.709μs     | 2.822μs     | 2.836μs     | 2.904μs     | 0.056μs  | 2.00%  | +0.95%      |
| FetchCachedServicesBench    | benchFetchAlias1                 |       | []     | 1000 | 20  | 956,296b    | 2.709μs     | 2.827μs     | 2.885μs     | 2.948μs     | 0.084μs  | 2.96%  | +1.15%      |
| FetchCachedServicesBench    | benchFetchRecursiveAlias1        |       | []     | 1000 | 20  | 956,304b    | 2.779μs     | 2.916μs     | 2.954μs     | 3.013μs     | 0.072μs  | 2.48%  | +4.33%      |
| FetchCachedServicesBench    | benchFetchRecursiveAlias2        |       | []     | 1000 | 20  | 956,304b    | 2.697μs     | 2.828μs     | 2.816μs     | 2.966μs     | 0.061μs  | 2.15%  | +1.19%      |
| FetchCachedServicesBench    | benchFetchAbstractFactoryService |       | []     | 1000 | 20  | 956,312b    | 12.812μs    | 13.445μs    | 13.619μs    | 14.040μs    | 0.348μs  | 2.59%  | +380.97%    |
| FetchNewServiceManagerBench | benchFetchServiceManagerCreation |       | []     | 100  | 20  | 24,024,288b | 1,727.250μs | 1,781.060μs | 1,798.275μs | 1,836.240μs | 35.488μs | 1.99%  | +63,616.24% |
| FetchNewServicesBench       | benchFetchFactory1               |       | []     | 1000 | 10  | 958,984b    | 13.208μs    | 13.645μs    | 13.513μs    | 14.241μs    | 0.315μs  | 2.31%  | +388.13%    |
| FetchNewServicesBench       | benchBuildFactory1               |       | []     | 1000 | 10  | 958,984b    | 11.977μs    | 12.463μs    | 12.280μs    | 13.015μs    | 0.324μs  | 2.60%  | +345.85%    |
| FetchNewServicesBench       | benchFetchInvokable1             |       | []     | 1000 | 10  | 958,984b    | 13.842μs    | 14.317μs    | 14.216μs    | 14.893μs    | 0.347μs  | 2.43%  | +412.19%    |
| FetchNewServicesBench       | benchBuildInvokable1             |       | []     | 1000 | 10  | 958,984b    | 12.404μs    | 12.719μs    | 12.524μs    | 13.141μs    | 0.270μs  | 2.13%  | +355.02%    |
| FetchNewServicesBench       | benchFetchService1               |       | []     | 1000 | 10  | 958,984b    | 2.725μs     | 2.795μs     | 2.756μs     | 2.891μs     | 0.063μs  | 2.25%  | 0.00%       |
| FetchNewServicesBench       | benchFetchFactoryAlias1          |       | []     | 1000 | 10  | 958,984b    | 12.247μs    | 12.627μs    | 12.505μs    | 12.924μs    | 0.224μs  | 1.77%  | +351.73%    |
| FetchNewServicesBench       | benchBuildFactoryAlias1          |       | []     | 1000 | 10  | 958,984b    | 12.102μs    | 12.514μs    | 12.778μs    | 12.840μs    | 0.288μs  | 2.30%  | +347.66%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 959,000b    | 12.423μs    | 12.861μs    | 13.059μs    | 13.234μs    | 0.284μs  | 2.21%  | +360.11%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 959,000b    | 12.320μs    | 12.720μs    | 12.580μs    | 13.241μs    | 0.280μs  | 2.20%  | +355.04%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 959,000b    | 12.238μs    | 12.539μs    | 12.589μs    | 12.740μs    | 0.149μs  | 1.19%  | +348.57%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 959,000b    | 12.624μs    | 13.082μs    | 12.904μs    | 13.617μs    | 0.325μs  | 2.48%  | +368.00%    |
| FetchNewServicesBench       | benchFetchAbstractFactoryFoo     |       | []     | 1000 | 10  | 958,992b    | 13.117μs    | 13.784μs    | 14.142μs    | 14.268μs    | 0.457μs  | 3.32%  | +393.11%    |
| FetchNewServicesBench       | benchBuildAbstractFactoryFoo     |       | []     | 1000 | 10  | 958,992b    | 12.300μs    | 12.809μs    | 13.029μs    | 13.200μs    | 0.288μs  | 2.25%  | +358.23%    |
| SetNewServicesBench         | benchSetFactory                  |       | []     | 1000 | 10  | 983,632b    | 77.222μs    | 80.637μs    | 78.987μs    | 84.438μs    | 2.643μs  | 3.28%  | +2,784.72%  |
| SetNewServicesBench         | benchSetAlias                    |       | []     | 1000 | 10  | 983,632b    | 86.602μs    | 88.310μs    | 87.692μs    | 90.267μs    | 1.245μs  | 1.41%  | +3,059.22%  |
| SetNewServicesBench         | benchSetAliasOverrided           |       | []     | 1000 | 10  | 983,640b    | 81.414μs    | 84.044μs    | 82.465μs    | 88.042μs    | 2.314μs  | 2.75%  | +2,906.63%  |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+

Your patch:

+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| benchmark                   | subject                          | group | params | revs | its | mem         | best        | mean        | mode        | worst       | stdev    | rstdev | diff        |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| FetchCachedServicesBench    | benchFetchFactory1               |       | []     | 1000 | 20  | 964,792b    | 2.764μs     | 2.875μs     | 2.847μs     | 2.977μs     | 0.071μs  | 2.45%  | +2.64%      |
| FetchCachedServicesBench    | benchFetchInvokable1             |       | []     | 1000 | 20  | 964,792b    | 2.702μs     | 2.801μs     | 2.781μs     | 2.939μs     | 0.060μs  | 2.13%  | 0.00%       |
| FetchCachedServicesBench    | benchFetchService1               |       | []     | 1000 | 20  | 964,792b    | 2.831μs     | 2.948μs     | 2.970μs     | 3.047μs     | 0.068μs  | 2.31%  | +5.25%      |
| FetchCachedServicesBench    | benchFetchAlias1                 |       | []     | 1000 | 20  | 964,792b    | 2.686μs     | 2.812μs     | 2.838μs     | 2.908μs     | 0.065μs  | 2.32%  | +0.40%      |
| FetchCachedServicesBench    | benchFetchRecursiveAlias1        |       | []     | 1000 | 20  | 964,800b    | 2.812μs     | 2.911μs     | 2.930μs     | 3.021μs     | 0.067μs  | 2.32%  | +3.95%      |
| FetchCachedServicesBench    | benchFetchRecursiveAlias2        |       | []     | 1000 | 20  | 964,800b    | 2.747μs     | 2.862μs     | 2.935μs     | 2.961μs     | 0.074μs  | 2.59%  | +2.18%      |
| FetchCachedServicesBench    | benchFetchAbstractFactoryService |       | []     | 1000 | 20  | 964,808b    | 13.010μs    | 13.501μs    | 13.659μs    | 14.150μs    | 0.299μs  | 2.21%  | +382.09%    |
| FetchNewServiceManagerBench | benchFetchServiceManagerCreation |       | []     | 100  | 20  | 24,030,120b | 1,925.660μs | 1,962.191μs | 1,936.676μs | 2,009.680μs | 28.444μs | 1.45%  | +69,965.74% |
| FetchNewServicesBench       | benchFetchFactory1               |       | []     | 1000 | 10  | 967,480b    | 13.060μs    | 13.409μs    | 13.214μs    | 14.046μs    | 0.303μs  | 2.26%  | +378.82%    |
| FetchNewServicesBench       | benchBuildFactory1               |       | []     | 1000 | 10  | 967,480b    | 11.992μs    | 12.426μs    | 12.285μs    | 12.991μs    | 0.310μs  | 2.49%  | +343.69%    |
| FetchNewServicesBench       | benchFetchInvokable1             |       | []     | 1000 | 10  | 967,480b    | 13.611μs    | 14.086μs    | 14.041μs    | 14.667μs    | 0.291μs  | 2.07%  | +402.98%    |
| FetchNewServicesBench       | benchBuildInvokable1             |       | []     | 1000 | 10  | 967,480b    | 12.400μs    | 12.837μs    | 13.069μs    | 13.199μs    | 0.296μs  | 2.31%  | +358.40%    |
| FetchNewServicesBench       | benchFetchService1               |       | []     | 1000 | 10  | 967,480b    | 2.723μs     | 2.814μs     | 2.762μs     | 2.939μs     | 0.068μs  | 2.42%  | +0.46%      |
| FetchNewServicesBench       | benchFetchFactoryAlias1          |       | []     | 1000 | 10  | 967,480b    | 12.683μs    | 13.027μs    | 12.956μs    | 13.508μs    | 0.251μs  | 1.93%  | +365.15%    |
| FetchNewServicesBench       | benchBuildFactoryAlias1          |       | []     | 1000 | 10  | 967,480b    | 12.385μs    | 12.893μs    | 12.766μs    | 13.410μs    | 0.322μs  | 2.50%  | +360.39%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 967,496b    | 12.296μs    | 12.566μs    | 12.421μs    | 13.015μs    | 0.239μs  | 1.90%  | +348.70%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 967,496b    | 12.272μs    | 12.825μs    | 13.105μs    | 13.331μs    | 0.356μs  | 2.77%  | +357.96%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 967,496b    | 12.286μs    | 12.649μs    | 12.569μs    | 13.152μs    | 0.271μs  | 2.15%  | +351.68%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 967,496b    | 12.125μs    | 12.582μs    | 12.716μs    | 13.166μs    | 0.340μs  | 2.71%  | +349.27%    |
| FetchNewServicesBench       | benchFetchAbstractFactoryFoo     |       | []     | 1000 | 10  | 967,488b    | 12.851μs    | 13.358μs    | 13.600μs    | 13.813μs    | 0.351μs  | 2.63%  | +376.99%    |
| FetchNewServicesBench       | benchBuildAbstractFactoryFoo     |       | []     | 1000 | 10  | 967,488b    | 12.266μs    | 12.705μs    | 12.633μs    | 13.135μs    | 0.295μs  | 2.33%  | +353.65%    |
| SetNewServicesBench         | benchSetFactory                  |       | []     | 1000 | 10  | 992,128b    | 12.394μs    | 12.755μs    | 12.657μs    | 13.189μs    | 0.237μs  | 1.86%  | +355.45%    |
| SetNewServicesBench         | benchSetAlias                    |       | []     | 1000 | 10  | 992,128b    | 28.579μs    | 29.372μs    | 29.209μs    | 30.831μs    | 0.590μs  | 2.01%  | +948.80%    |
| SetNewServicesBench         | benchSetAliasOverrided           |       | []     | 1000 | 10  | 992,136b    | 76.288μs    | 77.842μs    | 77.077μs    | 81.144μs    | 1.435μs  | 1.84%  | +2,679.58%  |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+

Patch with my changes applied:

+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| benchmark                   | subject                          | group | params | revs | its | mem         | best        | mean        | mode        | worst       | stdev    | rstdev | diff        |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| FetchCachedServicesBench    | benchFetchFactory1               |       | []     | 1000 | 20  | 963,632b    | 2.787μs     | 2.905μs     | 2.917μs     | 3.028μs     | 0.073μs  | 2.53%  | +5.00%      |
| FetchCachedServicesBench    | benchFetchInvokable1             |       | []     | 1000 | 20  | 963,632b    | 2.681μs     | 2.776μs     | 2.769μs     | 2.899μs     | 0.060μs  | 2.14%  | +0.31%      |
| FetchCachedServicesBench    | benchFetchService1               |       | []     | 1000 | 20  | 963,632b    | 2.706μs     | 2.810μs     | 2.794μs     | 2.929μs     | 0.056μs  | 1.98%  | +1.54%      |
| FetchCachedServicesBench    | benchFetchAlias1                 |       | []     | 1000 | 20  | 963,632b    | 2.674μs     | 2.767μs     | 2.770μs     | 2.875μs     | 0.055μs  | 1.98%  | 0.00%       |
| FetchCachedServicesBench    | benchFetchRecursiveAlias1        |       | []     | 1000 | 20  | 963,640b    | 2.706μs     | 2.813μs     | 2.797μs     | 2.952μs     | 0.067μs  | 2.38%  | +1.67%      |
| FetchCachedServicesBench    | benchFetchRecursiveAlias2        |       | []     | 1000 | 20  | 963,640b    | 2.732μs     | 2.831μs     | 2.837μs     | 2.952μs     | 0.061μs  | 2.14%  | +2.31%      |
| FetchCachedServicesBench    | benchFetchAbstractFactoryService |       | []     | 1000 | 20  | 963,648b    | 13.188μs    | 13.635μs    | 13.652μs    | 14.290μs    | 0.283μs  | 2.07%  | +392.77%    |
| FetchNewServiceManagerBench | benchFetchServiceManagerCreation |       | []     | 100  | 20  | 24,029,912b | 1,721.170μs | 1,775.793μs | 1,793.328μs | 1,826.520μs | 29.444μs | 1.66%  | +64,076.38% |
| FetchNewServicesBench       | benchFetchFactory1               |       | []     | 1000 | 10  | 966,320b    | 13.020μs    | 13.574μs    | 13.548μs    | 14.122μs    | 0.293μs  | 2.16%  | +390.55%    |
| FetchNewServicesBench       | benchBuildFactory1               |       | []     | 1000 | 10  | 966,320b    | 11.946μs    | 12.302μs    | 12.087μs    | 12.896μs    | 0.310μs  | 2.52%  | +344.59%    |
| FetchNewServicesBench       | benchFetchInvokable1             |       | []     | 1000 | 10  | 966,320b    | 13.547μs    | 14.153μs    | 14.431μs    | 14.638μs    | 0.389μs  | 2.75%  | +411.47%    |
| FetchNewServicesBench       | benchBuildInvokable1             |       | []     | 1000 | 10  | 966,320b    | 12.278μs    | 12.784μs    | 12.606μs    | 13.194μs    | 0.307μs  | 2.40%  | +362.01%    |
| FetchNewServicesBench       | benchFetchService1               |       | []     | 1000 | 10  | 966,320b    | 2.682μs     | 2.791μs     | 2.839μs     | 2.883μs     | 0.070μs  | 2.52%  | +0.85%      |
| FetchNewServicesBench       | benchFetchFactoryAlias1          |       | []     | 1000 | 10  | 966,320b    | 11.850μs    | 12.364μs    | 12.456μs    | 12.827μs    | 0.274μs  | 2.21%  | +346.83%    |
| FetchNewServicesBench       | benchBuildFactoryAlias1          |       | []     | 1000 | 10  | 966,320b    | 12.022μs    | 12.544μs    | 12.759μs    | 12.851μs    | 0.290μs  | 2.32%  | +353.33%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 966,336b    | 12.302μs    | 12.696μs    | 12.441μs    | 13.118μs    | 0.304μs  | 2.40%  | +358.82%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 966,336b    | 12.296μs    | 12.507μs    | 12.380μs    | 12.750μs    | 0.162μs  | 1.29%  | +352.01%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 966,336b    | 12.100μs    | 12.686μs    | 12.490μs    | 13.144μs    | 0.346μs  | 2.72%  | +358.46%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 966,336b    | 12.291μs    | 12.808μs    | 13.010μs    | 13.295μs    | 0.336μs  | 2.62%  | +362.86%    |
| FetchNewServicesBench       | benchFetchAbstractFactoryFoo     |       | []     | 1000 | 10  | 966,328b    | 13.034μs    | 13.407μs    | 13.255μs    | 13.831μs    | 0.269μs  | 2.00%  | +384.51%    |
| FetchNewServicesBench       | benchBuildAbstractFactoryFoo     |       | []     | 1000 | 10  | 966,328b    | 11.924μs    | 12.336μs    | 12.236μs    | 12.890μs    | 0.311μs  | 2.52%  | +345.82%    |
| SetNewServicesBench         | benchSetFactory                  |       | []     | 1000 | 10  | 990,968b    | 12.068μs    | 12.315μs    | 12.161μs    | 12.780μs    | 0.249μs  | 2.03%  | +345.06%    |
| SetNewServicesBench         | benchSetAlias                    |       | []     | 1000 | 10  | 990,968b    | 29.545μs    | 30.293μs    | 30.115μs    | 30.939μs    | 0.428μs  | 1.41%  | +994.77%    |
| SetNewServicesBench         | benchSetAliasOverrided           |       | []     | 1000 | 10  | 990,976b    | 77.590μs    | 79.520μs    | 78.961μs    | 83.019μs    | 1.507μs  | 1.90%  | +2,773.80%  |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+

@Ocramius Ocramius changed the title Fix slow set methods in SM Improved setFactory and setAlias API Jun 1, 2016
@Ocramius Ocramius changed the title Improved setFactory and setAlias API Improved setFactory and setAlias performance Jun 1, 2016
Ocramius added a commit that referenced this pull request Jun 1, 2016
Ocramius added a commit that referenced this pull request Jun 1, 2016
Ocramius added a commit that referenced this pull request Jun 1, 2016
Before:

+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| benchmark                   | subject                          | group | params | revs | its | mem         | best        | mean        | mode        | worst       | stdev    | rstdev | diff        |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| FetchCachedServicesBench    | benchFetchFactory1               |       | []     | 1000 | 20  | 964,792b    | 2.764μs     | 2.875μs     | 2.847μs     | 2.977μs     | 0.071μs  | 2.45%  | +2.64%      |
| FetchCachedServicesBench    | benchFetchInvokable1             |       | []     | 1000 | 20  | 964,792b    | 2.702μs     | 2.801μs     | 2.781μs     | 2.939μs     | 0.060μs  | 2.13%  | 0.00%       |
| FetchCachedServicesBench    | benchFetchService1               |       | []     | 1000 | 20  | 964,792b    | 2.831μs     | 2.948μs     | 2.970μs     | 3.047μs     | 0.068μs  | 2.31%  | +5.25%      |
| FetchCachedServicesBench    | benchFetchAlias1                 |       | []     | 1000 | 20  | 964,792b    | 2.686μs     | 2.812μs     | 2.838μs     | 2.908μs     | 0.065μs  | 2.32%  | +0.40%      |
| FetchCachedServicesBench    | benchFetchRecursiveAlias1        |       | []     | 1000 | 20  | 964,800b    | 2.812μs     | 2.911μs     | 2.930μs     | 3.021μs     | 0.067μs  | 2.32%  | +3.95%      |
| FetchCachedServicesBench    | benchFetchRecursiveAlias2        |       | []     | 1000 | 20  | 964,800b    | 2.747μs     | 2.862μs     | 2.935μs     | 2.961μs     | 0.074μs  | 2.59%  | +2.18%      |
| FetchCachedServicesBench    | benchFetchAbstractFactoryService |       | []     | 1000 | 20  | 964,808b    | 13.010μs    | 13.501μs    | 13.659μs    | 14.150μs    | 0.299μs  | 2.21%  | +382.09%    |
| FetchNewServiceManagerBench | benchFetchServiceManagerCreation |       | []     | 100  | 20  | 24,030,120b | 1,925.660μs | 1,962.191μs | 1,936.676μs | 2,009.680μs | 28.444μs | 1.45%  | +69,965.74% |
| FetchNewServicesBench       | benchFetchFactory1               |       | []     | 1000 | 10  | 967,480b    | 13.060μs    | 13.409μs    | 13.214μs    | 14.046μs    | 0.303μs  | 2.26%  | +378.82%    |
| FetchNewServicesBench       | benchBuildFactory1               |       | []     | 1000 | 10  | 967,480b    | 11.992μs    | 12.426μs    | 12.285μs    | 12.991μs    | 0.310μs  | 2.49%  | +343.69%    |
| FetchNewServicesBench       | benchFetchInvokable1             |       | []     | 1000 | 10  | 967,480b    | 13.611μs    | 14.086μs    | 14.041μs    | 14.667μs    | 0.291μs  | 2.07%  | +402.98%    |
| FetchNewServicesBench       | benchBuildInvokable1             |       | []     | 1000 | 10  | 967,480b    | 12.400μs    | 12.837μs    | 13.069μs    | 13.199μs    | 0.296μs  | 2.31%  | +358.40%    |
| FetchNewServicesBench       | benchFetchService1               |       | []     | 1000 | 10  | 967,480b    | 2.723μs     | 2.814μs     | 2.762μs     | 2.939μs     | 0.068μs  | 2.42%  | +0.46%      |
| FetchNewServicesBench       | benchFetchFactoryAlias1          |       | []     | 1000 | 10  | 967,480b    | 12.683μs    | 13.027μs    | 12.956μs    | 13.508μs    | 0.251μs  | 1.93%  | +365.15%    |
| FetchNewServicesBench       | benchBuildFactoryAlias1          |       | []     | 1000 | 10  | 967,480b    | 12.385μs    | 12.893μs    | 12.766μs    | 13.410μs    | 0.322μs  | 2.50%  | +360.39%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 967,496b    | 12.296μs    | 12.566μs    | 12.421μs    | 13.015μs    | 0.239μs  | 1.90%  | +348.70%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 967,496b    | 12.272μs    | 12.825μs    | 13.105μs    | 13.331μs    | 0.356μs  | 2.77%  | +357.96%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 967,496b    | 12.286μs    | 12.649μs    | 12.569μs    | 13.152μs    | 0.271μs  | 2.15%  | +351.68%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 967,496b    | 12.125μs    | 12.582μs    | 12.716μs    | 13.166μs    | 0.340μs  | 2.71%  | +349.27%    |
| FetchNewServicesBench       | benchFetchAbstractFactoryFoo     |       | []     | 1000 | 10  | 967,488b    | 12.851μs    | 13.358μs    | 13.600μs    | 13.813μs    | 0.351μs  | 2.63%  | +376.99%    |
| FetchNewServicesBench       | benchBuildAbstractFactoryFoo     |       | []     | 1000 | 10  | 967,488b    | 12.266μs    | 12.705μs    | 12.633μs    | 13.135μs    | 0.295μs  | 2.33%  | +353.65%    |
| SetNewServicesBench         | benchSetFactory                  |       | []     | 1000 | 10  | 992,128b    | 12.394μs    | 12.755μs    | 12.657μs    | 13.189μs    | 0.237μs  | 1.86%  | +355.45%    |
| SetNewServicesBench         | benchSetAlias                    |       | []     | 1000 | 10  | 992,128b    | 28.579μs    | 29.372μs    | 29.209μs    | 30.831μs    | 0.590μs  | 2.01%  | +948.80%    |
| SetNewServicesBench         | benchSetAliasOverrided           |       | []     | 1000 | 10  | 992,136b    | 76.288μs    | 77.842μs    | 77.077μs    | 81.144μs    | 1.435μs  | 1.84%  | +2,679.58%  |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+

After:

+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| benchmark                   | subject                          | group | params | revs | its | mem         | best        | mean        | mode        | worst       | stdev    | rstdev | diff        |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
| FetchCachedServicesBench    | benchFetchFactory1               |       | []     | 1000 | 20  | 963,704b    | 2.727μs     | 2.858μs     | 2.847μs     | 2.983μs     | 0.064μs  | 2.25%  | +7.11%      |
| FetchCachedServicesBench    | benchFetchInvokable1             |       | []     | 1000 | 20  | 963,704b    | 2.577μs     | 2.705μs     | 2.689μs     | 2.829μs     | 0.081μs  | 3.00%  | +1.38%      |
| FetchCachedServicesBench    | benchFetchService1               |       | []     | 1000 | 20  | 963,704b    | 2.597μs     | 2.668μs     | 2.636μs     | 2.766μs     | 0.046μs  | 1.74%  | 0.00%       |
| FetchCachedServicesBench    | benchFetchAlias1                 |       | []     | 1000 | 20  | 963,704b    | 2.597μs     | 2.721μs     | 2.702μs     | 2.852μs     | 0.084μs  | 3.07%  | +1.99%      |
| FetchCachedServicesBench    | benchFetchRecursiveAlias1        |       | []     | 1000 | 20  | 963,712b    | 2.622μs     | 2.725μs     | 2.795μs     | 2.829μs     | 0.079μs  | 2.89%  | +2.13%      |
| FetchCachedServicesBench    | benchFetchRecursiveAlias2        |       | []     | 1000 | 20  | 963,712b    | 2.647μs     | 2.760μs     | 2.725μs     | 2.893μs     | 0.064μs  | 2.31%  | +3.44%      |
| FetchCachedServicesBench    | benchFetchAbstractFactoryService |       | []     | 1000 | 20  | 963,720b    | 12.608μs    | 13.053μs    | 13.206μs    | 13.434μs    | 0.254μs  | 1.94%  | +389.20%    |
| FetchNewServiceManagerBench | benchFetchServiceManagerCreation |       | []     | 100  | 20  | 24,029,952b | 1,699.350μs | 1,733.026μs | 1,720.312μs | 1,790.900μs | 24.906μs | 1.44%  | +64,849.89% |
| FetchNewServicesBench       | benchFetchFactory1               |       | []     | 1000 | 10  | 966,392b    | 12.609μs    | 13.165μs    | 13.185μs    | 13.559μs    | 0.266μs  | 2.02%  | +393.38%    |
| FetchNewServicesBench       | benchBuildFactory1               |       | []     | 1000 | 10  | 966,392b    | 11.787μs    | 12.125μs    | 11.949μs    | 12.514μs    | 0.262μs  | 2.16%  | +354.41%    |
| FetchNewServicesBench       | benchFetchInvokable1             |       | []     | 1000 | 10  | 966,392b    | 13.441μs    | 13.798μs    | 13.877μs    | 14.157μs    | 0.209μs  | 1.51%  | +417.12%    |
| FetchNewServicesBench       | benchBuildInvokable1             |       | []     | 1000 | 10  | 966,392b    | 12.281μs    | 12.605μs    | 12.432μs    | 13.029μs    | 0.256μs  | 2.03%  | +372.42%    |
| FetchNewServicesBench       | benchFetchService1               |       | []     | 1000 | 10  | 966,392b    | 2.810μs     | 2.864μs     | 2.834μs     | 2.958μs     | 0.049μs  | 1.72%  | +7.33%      |
| FetchNewServicesBench       | benchFetchFactoryAlias1          |       | []     | 1000 | 10  | 966,392b    | 11.910μs    | 12.376μs    | 12.187μs    | 12.974μs    | 0.351μs  | 2.84%  | +363.82%    |
| FetchNewServicesBench       | benchBuildFactoryAlias1          |       | []     | 1000 | 10  | 966,392b    | 12.000μs    | 12.354μs    | 12.329μs    | 12.672μs    | 0.176μs  | 1.42%  | +363.01%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 966,408b    | 11.691μs    | 12.134μs    | 12.277μs    | 12.501μs    | 0.262μs  | 2.16%  | +354.76%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias1 |       | []     | 1000 | 10  | 966,408b    | 12.137μs    | 12.516μs    | 12.344μs    | 12.971μs    | 0.277μs  | 2.21%  | +369.09%    |
| FetchNewServicesBench       | benchFetchRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 966,408b    | 11.863μs    | 12.326μs    | 12.412μs    | 12.721μs    | 0.295μs  | 2.40%  | +361.95%    |
| FetchNewServicesBench       | benchBuildRecursiveFactoryAlias2 |       | []     | 1000 | 10  | 966,408b    | 11.780μs    | 12.177μs    | 12.138μs    | 12.648μs    | 0.275μs  | 2.26%  | +356.38%    |
| FetchNewServicesBench       | benchFetchAbstractFactoryFoo     |       | []     | 1000 | 10  | 966,400b    | 12.754μs    | 13.143μs    | 12.982μs    | 13.743μs    | 0.311μs  | 2.37%  | +392.58%    |
| FetchNewServicesBench       | benchBuildAbstractFactoryFoo     |       | []     | 1000 | 10  | 966,400b    | 11.730μs    | 12.002μs    | 11.872μs    | 12.480μs    | 0.237μs  | 1.98%  | +349.82%    |
| SetNewServicesBench         | benchSetFactory                  |       | []     | 1000 | 10  | 991,040b    | 11.968μs    | 12.282μs    | 12.419μs    | 12.579μs    | 0.204μs  | 1.66%  | +360.32%    |
| SetNewServicesBench         | benchSetAlias                    |       | []     | 1000 | 10  | 991,040b    | 28.803μs    | 29.834μs    | 29.417μs    | 30.981μs    | 0.703μs  | 2.36%  | +1,018.11%  |
| SetNewServicesBench         | benchSetAliasOverrided           |       | []     | 1000 | 10  | 991,048b    | 74.980μs    | 76.211μs    | 75.839μs    | 78.355μs    | 0.944μs  | 1.24%  | +2,756.22%  |
+-----------------------------+----------------------------------+-------+--------+------+-----+-------------+-------------+-------------+-------------+-------------+----------+--------+-------------+
Ocramius added a commit that referenced this pull request Jun 1, 2016
Ocramius added a commit that referenced this pull request Jun 1, 2016
Ocramius added a commit that referenced this pull request Jun 1, 2016
Ocramius added a commit that referenced this pull request Jun 1, 2016
@Ocramius
Copy link
Member

Ocramius commented Jun 1, 2016

Merged into 3.1.0 via 5f3bb42

@Ocramius Ocramius closed this Jun 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants