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

Better chacha20 implementation #106

Merged
merged 1 commit into from
Aug 22, 2018
Merged

Conversation

xqdoo00o
Copy link

Replace by lib github.com/aead/chacha20

Replace by lib github.com/aead/chacha20
@riobard
Copy link

riobard commented Aug 15, 2018

Why is it "better"?

@xqdoo00o
Copy link
Author

xqdoo00o commented Aug 16, 2018

OK,I test it on amd64 linux machine.

go test -test.bench=BenchmarkChaCha20_1k 
pkg: github.com/Yawning/chacha20
BenchmarkChaCha20_1k 	 1000000	      1404 ns/op	 729.19 MB/s

go test -test.bench=BenchmarkChaCha20_1K
pkg: github.com/aead/chacha20
BenchmarkChaCha20_1K 	 1000000	      1148 ns/op	 891.70 MB/s

After lots of testing, I think the encrypt perf has 20% increase in general, and iperf test also confirm this.
(maybe more readability code for me ...)

@riobard riobard merged commit 18fc4a9 into shadowsocks:master Aug 22, 2018
@riobard
Copy link

riobard commented Aug 22, 2018

Great! Thanks for the PR!

xiahaijiao pushed a commit to xiahaijiao/go-shadowsocks2 that referenced this pull request Jan 10, 2024
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.

2 participants