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

performance improvement #159

Open
LuoZijun opened this issue May 5, 2021 · 2 comments
Open

performance improvement #159

LuoZijun opened this issue May 5, 2021 · 2 comments

Comments

@LuoZijun
Copy link

LuoZijun commented May 5, 2021

Hi, i just tried to write a base64 codec and the performance has improved compared to your project.

feel free review code or copy code to this project :)

Code: https://github.com/shadowsocks/crypto2/blob/dev/src/base64.rs

Result:

// Your Project
test base64::bench_crate_decode     ... bench:          31 ns/iter (+/- 5)
test base64::bench_crate_encode     ... bench:          14 ns/iter (+/- 1)
// Me
test base64::bench_decode           ... bench:           7 ns/iter (+/- 2)
test base64::bench_encode           ... bench:           4 ns/iter (+/- 0)
@marshallpierce
Copy link
Owner

That's great! I'm squeezed for time right now so it'll be a while until I get to it, but thanks for the contribution!

@dkomanov
Copy link

I don't know if you did any performance improvements since, but I did a benchmarks and base64 clearly faster than crypto2's implementation: https://dkomanov.medium.com/base64-encoding-performance-java-vs-rust-c59f438411f0.

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

No branches or pull requests

3 participants