-
Notifications
You must be signed in to change notification settings - Fork 47
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
Slow Sign #42
Comments
Hi @pascaldekloe thanks for the benchs, I haven't added them to the repo yet. I've a question, am I get it right: 2212 ns/op vs 2034 ns/op ? |
Yes that is correct. A 10 % slowdown in comparison. |
I suggest using the benchstat when doing benchmarks. This way, you can share benchmark results in a more intuitive way. Plus it tries to determine whether results are stable or it's a noise. |
The benchmarks are a start. Sign is still slow in comparison. Maybe remove the fast claim from the README otherwise? |
Will revisit benches during the weekend 👍 |
@pascaldekloe have run benchmarks, please tell me where it's 'still slow' ? |
Didn't look. Just shared the observation here. Please reopen the issue. |
Please provide where it's slow first. |
No improvement: v3.0.2 is still about 10% slower. |
Nice. Please share a benchmark code/repo, your OS and environment, machine setup and Go version. |
The code & repo is in the description. I'm using a Mac Pro from 2013 and Go version 1.14. |
Just run code from https://github.com/cristaloleg/benches/tree/master/jwt and I can confirm that cristalhq/jwt/v3 performs a bit better on my machine (MacBook Pro (13-inch, Late 2016)):
Similar results on 40$ per month Linux droplet on Digitalocean (
|
Check Errors & Parse JSON
ECDSA is still broken on v3.0.2:
The HMAC sync pool really pays of here. I'll try to borrow that idea. 😏 |
lol |
Done with pascaldekloe/jwt@9f0fa18. Do you need a bug report for the broken ECDSA @cristaloleg? |
Created a pull request cristaloleg/benches#1 @cristaloleg. This time with a regular intel [not Xeon] and it's still significantly slower. |
Forgot to mention: problem with sign in ES is fixed in v3.0.3 https://github.com/cristalhq/jwt/releases/tag/v3.0.3 Thank you for the info. |
No benchmarks so I did a small comparison.
The text was updated successfully, but these errors were encountered: