Skip to content
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

Un-inline updateDigest #30

Merged
merged 1 commit into from
Jul 20, 2020
Merged

Un-inline updateDigest #30

merged 1 commit into from
Jul 20, 2020

Conversation

greatroar
Copy link

Go 1.14 can inline it without assistance. The benchmarks show a tiny, but significant speedup:

name                 old time/op   new time/op   delta
ChunkerWithSHA256-8    201ms ± 0%    201ms ± 0%    ~     (p=0.169 n=19+18)
Chunker-8             55.3ms ± 1%   55.0ms ± 0%  -0.40%  (p=0.000 n=18+16)
NewChunker-8          95.3µs ± 2%   95.7µs ± 3%    ~     (p=0.426 n=18+20)

name                 old speed     new speed     delta
ChunkerWithSHA256-8  167MB/s ± 0%  167MB/s ± 0%    ~     (p=0.152 n=19+18)
Chunker-8            607MB/s ± 1%  610MB/s ± 0%  +0.40%  (p=0.000 n=18+16)

This is most likely because the c.tables is no longer copied to the stack.

Go 1.14 can inline it without assistance. The benchmarks show a tiny,
but significant speedup:

name                 old time/op   new time/op   delta
ChunkerWithSHA256-8    201ms ± 0%    201ms ± 0%    ~     (p=0.169 n=19+18)
Chunker-8             55.3ms ± 1%   55.0ms ± 0%  -0.40%  (p=0.000 n=18+16)
NewChunker-8          95.3µs ± 2%   95.7µs ± 3%    ~     (p=0.426 n=18+20)

name                 old speed     new speed     delta
ChunkerWithSHA256-8  167MB/s ± 0%  167MB/s ± 0%    ~     (p=0.152 n=19+18)
Chunker-8            607MB/s ± 1%  610MB/s ± 0%  +0.40%  (p=0.000 n=18+16)

This is most likely because the c.tables is no longer copied to the
stack.
Copy link
Member

@fd0 fd0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fd0 fd0 merged commit 4d3a0aa into restic:master Jul 20, 2020
@greatroar greatroar deleted the uninline branch July 20, 2020 20:31
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.

None yet

2 participants