New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capitialize! parts of basename #127
Merged
Merged
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
Contributor
krzysiek1507
commented
Jun 29, 2020
•
edited
edited
Basename: point_3d_value ips benchmark: Warming up -------------------------------------- original 46.940k i/100ms patch 52.230k i/100ms Calculating ------------------------------------- original 502.884k (± 4.0%) i/s - 2.535M in 5.048545s patch 559.661k (± 4.7%) i/s - 2.820M in 5.050832s Comparison: patch: 559660.8 i/s original: 502883.7 i/s - 1.11x (± 0.00) slower memory benchmark: Calculating ------------------------------------- original 568.000 memsize ( 0.000 retained) 11.000 objects ( 0.000 retained) 6.000 strings ( 0.000 retained) patch 448.000 memsize ( 0.000 retained) 8.000 objects ( 0.000 retained) 4.000 strings ( 0.000 retained) Comparison: patch: 448 allocated original: 568 allocated - 1.27x more Basename: api ips benchmark: Warming up -------------------------------------- original 106.231k i/100ms patch 117.215k i/100ms Calculating ------------------------------------- original 1.075M (± 3.4%) i/s - 5.418M in 5.044269s patch 1.173M (± 3.1%) i/s - 5.978M in 5.101064s Comparison: patch: 1173028.5 i/s original: 1075274.9 i/s - 1.09x (± 0.00) slower memory benchmark: Calculating ------------------------------------- original 328.000 memsize ( 0.000 retained) 5.000 objects ( 0.000 retained) 2.000 strings ( 0.000 retained) patch 288.000 memsize ( 0.000 retained) 4.000 objects ( 0.000 retained) 1.000 strings ( 0.000 retained) Comparison: patch: 288 allocated original: 328 allocated - 1.14x more Basename: user ips benchmark: Warming up -------------------------------------- original 106.567k i/100ms patch 114.295k i/100ms Calculating ------------------------------------- original 1.069M (± 2.8%) i/s - 5.435M in 5.089107s patch 1.181M (± 3.6%) i/s - 5.943M in 5.039612s Comparison: patch: 1180876.4 i/s original: 1068774.7 i/s - 1.10x (± 0.00) slower memory benchmark: Calculating ------------------------------------- original 328.000 memsize ( 0.000 retained) 5.000 objects ( 0.000 retained) 2.000 strings ( 0.000 retained) patch 288.000 memsize ( 0.000 retained) 4.000 objects ( 0.000 retained) 1.000 strings ( 0.000 retained) Comparison: patch: 288 allocated original: 328 allocated - 1.14x more Basename: users_controller ips benchmark: Warming up -------------------------------------- original 68.993k i/100ms patch 74.035k i/100ms Calculating ------------------------------------- original 699.314k (± 3.6%) i/s - 3.519M in 5.038217s patch 754.746k (± 3.9%) i/s - 3.776M in 5.010223s Comparison: patch: 754745.9 i/s original: 699314.5 i/s - 1.08x (± 0.00) slower memory benchmark: Calculating ------------------------------------- original 448.000 memsize ( 0.000 retained) 8.000 objects ( 0.000 retained) 5.000 strings ( 0.000 retained) patch 368.000 memsize ( 0.000 retained) 6.000 objects ( 0.000 retained) 3.000 strings ( 0.000 retained) Comparison: patch: 368 allocated original: 448 allocated - 1.22x more Basename: super_users_controller ips benchmark: Warming up -------------------------------------- original 52.472k i/100ms patch 56.658k i/100ms Calculating ------------------------------------- original 521.691k (± 3.0%) i/s - 2.624M in 5.033469s patch 563.263k (± 3.0%) i/s - 2.833M in 5.033886s Comparison: patch: 563262.6 i/s original: 521690.6 i/s - 1.08x (± 0.00) slower memory benchmark: Calculating ------------------------------------- original 568.000 memsize ( 0.000 retained) 11.000 objects ( 0.000 retained) 7.000 strings ( 0.000 retained) patch 448.000 memsize ( 0.000 retained) 8.000 objects ( 0.000 retained) 4.000 strings ( 0.000 retained) Comparison: patch: 448 allocated original: 568 allocated - 1.27x more Basename: very_super_users_controller ips benchmark: Warming up -------------------------------------- original 37.528k i/100ms patch 41.258k i/100ms Calculating ------------------------------------- original 371.596k (± 3.0%) i/s - 1.876M in 5.054234s patch 398.737k (± 2.6%) i/s - 2.022M in 5.073531s Comparison: patch: 398737.4 i/s original: 371595.9 i/s - 1.07x (± 0.00) slower memory benchmark: Calculating ------------------------------------- original 848.000 memsize ( 0.000 retained) 14.000 objects ( 0.000 retained) 9.000 strings ( 0.000 retained) patch 688.000 memsize ( 0.000 retained) 10.000 objects ( 0.000 retained) 5.000 strings ( 0.000 retained) Comparison: patch: 688 allocated original: 848 allocated - 1.23x more
The last time I optimised it I missed an edge case (#59; sorry!). This time I hope there is no new bugs. |
I believe this is correct and allocates less. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.