This repository has been archived by the owner on Feb 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
Improved setFactory
and setAlias
performance
#113
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I manually applied some changes to this patch.
Your patch:
Patch with my changes applied:
|
Ocramius
changed the title
Fix slow set methods in SM
Improved Jun 1, 2016
setFactory
and setAlias
API
Ocramius
changed the title
Improved
Improved Jun 1, 2016
setFactory
and setAlias
APIsetFactory
and setAlias
performance
Ocramius
added a commit
that referenced
this pull request
Jun 1, 2016
Ocramius
added a commit
that referenced
this pull request
Jun 1, 2016
…s new aliases via old aliases
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
…formance' into develop Close #113
Merged into 3.1.0 via 5f3bb42 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All discussion is in #112
Provided PR give advantages on methods:
setFactory
is now 9x fastersetAlias
(for not intersecting case) is 3x fasterconfigure