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

optimize encode #1

Merged
merged 1 commit into from
Sep 15, 2021
Merged

optimize encode #1

merged 1 commit into from
Sep 15, 2021

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Jun 29, 2019

Avoid branches in the main encode loop.

benchmark                     old ns/op     new ns/op     delta
BenchmarkEncodeToString-4     19981         15283         -23.51%
BenchmarkDecodeString-4       46700         48240         +3.30%

benchmark                     old MB/s     new MB/s     speedup
BenchmarkEncodeToString-4     409.98       536.02       1.31x
BenchmarkDecodeString-4       280.77       271.80       0.97x

@Stebalien Stebalien merged commit b637202 into master Sep 15, 2021
@Stebalien Stebalien deleted the feat/optimize-encode branch September 15, 2021 15:00
@MarcoPolo MarcoPolo mentioned this pull request Jul 7, 2022
41 tasks
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