Skip to content

Simplified push method; updated first and max slice sizes#3

Merged
christianrpetrin merged 1 commit intomasterfrom
simplify-push-logic
Jan 6, 2019
Merged

Simplified push method; updated first and max slice sizes#3
christianrpetrin merged 1 commit intomasterfrom
simplify-push-logic

Conversation

@christianrpetrin
Copy link
Copy Markdown
Collaborator

@christianrpetrin christianrpetrin commented Jan 6, 2019

These changes yield some pretty good performance improvements.

benchstat old.txt new.txt
name                    old time/op    new time/op    delta
Microservice/0-4          4.95ns ± 1%    4.73ns ± 2%   -4.29%  (p=0.000 n=10+10)
Microservice/1-4           279ns ± 1%     257ns ± 1%   -7.74%  (p=0.000 n=10+10)
Microservice/10-4         2.02µs ± 0%    1.81µs ± 1%  -10.57%  (p=0.000 n=10+10)
Microservice/100-4        18.4µs ± 0%    16.5µs ± 0%  -10.55%  (p=0.000 n=10+10)
Microservice/1000-4        174µs ± 1%     162µs ± 1%   -7.32%  (p=0.000 n=9+10)
Microservice/10000-4      1.79ms ± 1%    1.69ms ± 1%   -5.34%  (p=0.000 n=10+9)
Microservice/100000-4     19.9ms ± 1%    19.6ms ± 1%   -1.47%  (p=0.000 n=10+10)
Microservice/1000000-4     210ms ± 2%     215ms ± 2%   +2.51%  (p=0.003 n=10+9)

name                    old alloc/op   new alloc/op   delta
Microservice/0-4           0.00B          0.00B          ~     (all equal)
Microservice/1-4            224B ± 0%      272B ± 0%  +21.43%  (p=0.000 n=10+10)
Microservice/10-4         1.49kB ± 0%    1.54kB ± 0%   +3.23%  (p=0.000 n=10+10)
Microservice/100-4        16.7kB ± 0%    15.2kB ± 0%   -8.92%  (p=0.000 n=10+10)
Microservice/1000-4        134kB ± 0%     161kB ± 0%  +20.40%  (p=0.000 n=10+10)
Microservice/10000-4      1.29MB ± 0%    1.76MB ± 0%  +36.56%  (p=0.000 n=10+10)
Microservice/100000-4     12.8MB ± 0%    17.6MB ± 0%  +37.57%  (p=0.000 n=10+8)
Microservice/1000000-4     128MB ± 0%     176MB ± 0%  +37.64%  (p=0.000 n=9+10)

name                    old allocs/op  new allocs/op  delta
Microservice/0-4            0.00           0.00          ~     (all equal)
Microservice/1-4            9.00 ± 0%      9.00 ± 0%     ~     (all equal)
Microservice/10-4           73.0 ± 0%      73.0 ± 0%     ~     (all equal)
Microservice/100-4           705 ± 0%       706 ± 0%   +0.14%  (p=0.000 n=10+10)
Microservice/1000-4        7.01k ± 0%     7.02k ± 0%   +0.14%  (p=0.000 n=10+10)
Microservice/10000-4       70.0k ± 0%     70.2k ± 0%   +0.19%  (p=0.000 n=10+10)
Microservice/100000-4       700k ± 0%      702k ± 0%   +0.20%  (p=0.000 n=10+10)
Microservice/1000000-4     7.00M ± 0%     7.02M ± 0%   +0.20%  (p=0.000 n=10+10)

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jan 6, 2019

Codecov Report

Merging #3 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #3   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines          45     32   -13     
=====================================
- Hits           45     32   -13
Impacted Files Coverage Δ
stack.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b8ceb7...75300c5. Read the comment docs.

@christianrpetrin christianrpetrin merged commit ee6e423 into master Jan 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants