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

inflate: Keep dict on stack #581

Merged
merged 1 commit into from
May 7, 2022
Merged

inflate: Keep dict on stack #581

merged 1 commit into from
May 7, 2022

Conversation

klauspost
Copy link
Owner

λ benchcmp before.txt  after.txt
benchmark                               old ns/op     new ns/op     delta
BenchmarkDecodeDigitsSpeed1e4-32        45478         44642         -1.84%
BenchmarkDecodeDigitsSpeed1e5-32        520045        506007        -2.70%
BenchmarkDecodeDigitsSpeed1e6-32        5213200       5067185       -2.80%
BenchmarkDecodeDigitsDefault1e4-32      49476         48936         -1.09%
BenchmarkDecodeDigitsDefault1e5-32      496733        490872        -1.18%
BenchmarkDecodeDigitsDefault1e6-32      4869294       4851319       -0.37%
BenchmarkDecodeDigitsCompress1e4-32     44262         44419         +0.35%
BenchmarkDecodeDigitsCompress1e5-32     470795        473693        +0.62%
BenchmarkDecodeDigitsCompress1e6-32     4690131       4689175       -0.02%
BenchmarkDecodeTwainSpeed1e4-32         49316         49218         -0.20%
BenchmarkDecodeTwainSpeed1e5-32         531644        527865        -0.71%
BenchmarkDecodeTwainSpeed1e6-32         5316889       5281027       -0.67%
BenchmarkDecodeTwainDefault1e4-32       49570         49543         -0.05%
BenchmarkDecodeTwainDefault1e5-32       492474        488411        -0.83%
BenchmarkDecodeTwainDefault1e6-32       4902696       4844194       -1.19%
BenchmarkDecodeTwainCompress1e4-32      47788         47235         -1.16%
BenchmarkDecodeTwainCompress1e5-32      465616        454616        -2.36%
BenchmarkDecodeTwainCompress1e6-32      4606437       4513280       -2.02%
BenchmarkDecodeRandomSpeed1e4-32        299           296           -0.94%
BenchmarkDecodeRandomSpeed1e5-32        1930          1942          +0.62%
BenchmarkDecodeRandomSpeed1e6-32        19980         19990         +0.05%

Tried copying, but mostly slower.

```
λ benchcmp before.txt  after.txt
benchmark                               old ns/op     new ns/op     delta
BenchmarkDecodeDigitsSpeed1e4-32        45478         44642         -1.84%
BenchmarkDecodeDigitsSpeed1e5-32        520045        506007        -2.70%
BenchmarkDecodeDigitsSpeed1e6-32        5213200       5067185       -2.80%
BenchmarkDecodeDigitsDefault1e4-32      49476         48936         -1.09%
BenchmarkDecodeDigitsDefault1e5-32      496733        490872        -1.18%
BenchmarkDecodeDigitsDefault1e6-32      4869294       4851319       -0.37%
BenchmarkDecodeDigitsCompress1e4-32     44262         44419         +0.35%
BenchmarkDecodeDigitsCompress1e5-32     470795        473693        +0.62%
BenchmarkDecodeDigitsCompress1e6-32     4690131       4689175       -0.02%
BenchmarkDecodeTwainSpeed1e4-32         49316         49218         -0.20%
BenchmarkDecodeTwainSpeed1e5-32         531644        527865        -0.71%
BenchmarkDecodeTwainSpeed1e6-32         5316889       5281027       -0.67%
BenchmarkDecodeTwainDefault1e4-32       49570         49543         -0.05%
BenchmarkDecodeTwainDefault1e5-32       492474        488411        -0.83%
BenchmarkDecodeTwainDefault1e6-32       4902696       4844194       -1.19%
BenchmarkDecodeTwainCompress1e4-32      47788         47235         -1.16%
BenchmarkDecodeTwainCompress1e5-32      465616        454616        -2.36%
BenchmarkDecodeTwainCompress1e6-32      4606437       4513280       -2.02%
BenchmarkDecodeRandomSpeed1e4-32        299           296           -0.94%
BenchmarkDecodeRandomSpeed1e5-32        1930          1942          +0.62%
BenchmarkDecodeRandomSpeed1e6-32        19980         19990         +0.05%
```
@klauspost klauspost merged commit 20d0f94 into master May 7, 2022
@klauspost klauspost deleted the inflate-dict-on-stack branch May 7, 2022 11:18
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.

1 participant