Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Performance regression #14

Open
daulet opened this issue Nov 19, 2023 · 2 comments
Open

Performance regression #14

daulet opened this issue Nov 19, 2023 · 2 comments

Comments

@daulet
Copy link
Owner

daulet commented Nov 19, 2023

We've regressed in benchmarks quite a bit from initial release.

benchstat benchmarks/3188ded27885d1002698a0e25f0b32306c430e88.txt benchmarks/$(git rev-parse HEAD).txt
goos: darwin
goarch: arm64
pkg: github.com/daulet/tokenizers
                 │ benchmarks/3188ded27885d1002698a0e25f0b32306c430e88.txt │ benchmarks/38a9a14c1c56b113461b0c7350c72de949e23cc2.txt │
                 │                         sec/op                          │             sec/op               vs base                │
EncodeNTimes-10                                               11.99µ ±  3%                     13.11µ ±   1%    +9.39% (p=0.002 n=6)
EncodeNChars-10                                               2.584n ±  8%                     2.989n ± 272%         ~ (p=0.485 n=6)
DecodeNTimes-10                                               1.701µ ±  3%                     4.535µ ±   2%  +166.66% (p=0.002 n=6)
DecodeNTokens-10                                              193.6n ± 10%                     656.1n ±   3%  +238.78% (p=0.002 n=6)
geomean                                                       317.8n                           584.3n          +83.86%

                 │ benchmarks/3188ded27885d1002698a0e25f0b32306c430e88.txt │ benchmarks/38a9a14c1c56b113461b0c7350c72de949e23cc2.txt │
                 │                          B/op                           │             B/op               vs base                  │
EncodeNTimes-10                                               84.00 ± 0%                       232.00 ± 0%  +176.19% (p=0.002 n=6)
EncodeNChars-10                                               0.000 ± 0%                        0.000 ± 0%         ~ (p=1.000 n=6) ¹
DecodeNTimes-10                                               96.00 ± 0%                        96.00 ± 0%         ~ (p=1.000 n=6) ¹
DecodeNTokens-10                                              7.000 ± 0%                        7.000 ± 0%         ~ (p=1.000 n=6) ¹
geomean                                                                  ²                                   +28.91%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                 │ benchmarks/3188ded27885d1002698a0e25f0b32306c430e88.txt │ benchmarks/38a9a14c1c56b113461b0c7350c72de949e23cc2.txt │
                 │                        allocs/op                        │           allocs/op            vs base                  │
EncodeNTimes-10                                               4.000 ± 0%                       12.000 ± 0%  +200.00% (p=0.002 n=6)
EncodeNChars-10                                               0.000 ± 0%                        0.000 ± 0%         ~ (p=1.000 n=6) ¹
DecodeNTimes-10                                               3.000 ± 0%                        3.000 ± 0%         ~ (p=1.000 n=6) ¹
DecodeNTokens-10                                              0.000 ± 0%                        0.000 ± 0%         ~ (p=1.000 n=6) ¹
geomean                                                                  ²                                   +31.61%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean
@daulet
Copy link
Owner Author

daulet commented Nov 19, 2023

CC @clems4ever @RJKeevil in case you'd be interesting in looking into this.

@daulet
Copy link
Owner Author

daulet commented Jul 10, 2024

I actually root caused it to this commit in the upstream library.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant