-
👋 注:速度测试的具体细节在 https://gist.github.com/pexcn/fe3dc944672cf70d6fda7a186240f932 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Well, I suspected that there are two main reasons First of all, Secondly, The pure Rust implementation doesn't have that kind of optimization. It is expected to have performance differences between them. Very decent benchmarks, could you make it into a table? Interestingly, Intel J1900 has SSE4.1 accourding its specification, but |
Beta Was this translation helpful? Give feedback.
-
@pexcn 已经有一个 XChaCha20 的速度优化版本,如果 XChaCha20 成为标准了,那么就可以加进去。 |
Beta Was this translation helpful? Give feedback.
Well, I suspected that there are two main reasons
First of all,
shadowsocks-libev
useslibsodium
for these two algorithms.chacha20
andxchacha20
have very similar implementation except nonce length, so they should perform nearly the same with the same implementation in one library. Butxchacha20-ietf-poly1305
should expect to have lower performance compared tochacha20-ietf-poly1305
because it requires extra calculation on generating new keys and nonces on everyencrypt
calls.Secondly,
chacha20-ietf-poly1305
in this project usesring
as its backend, butxchacha20-ietf-poly1305
uses a pure Rust implementation. As you can see in its implementation, if your CPU supports SSE4.1, it will use…