Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

what is the perf like compared to other bcrypt packages? #1

Open
capaj opened this issue Feb 5, 2025 · 1 comment
Open

what is the perf like compared to other bcrypt packages? #1

capaj opened this issue Feb 5, 2025 · 1 comment

Comments

@capaj
Copy link

capaj commented Feb 5, 2025

as per title

@andrewmd5
Copy link
Contributor

andrewmd5 commented Feb 5, 2025

I was curious about this, so I took a look and found some room for optimizations. Final results are:

(index) Task name Latency avg (ns) Latency med (ns) Throughput avg (ops/s) Throughput med (ops/s) Samples
0 '@uswriting/bcrypt' 1144860 ± 0.16% 1147083 ± 20875.00 874 ± 0.16% 872 ± 16 1311
1 'bcryptjs' 1161371 ± 0.16% 1162771 ± 20563.00 862 ± 0.15% 860 ± 15 1292
2 'node.bcrypt.js' 932114 ± 0.15% 932625 ± 17792.00 1074 ± 0.14% 1072 ± 20 1610
3 '@node-rs/bcrypt' 982096 ± 0.14% 984834 ± 18249.50 1019 ± 0.14% 1015 ± 19 1528

so 22.8% slower than node.bcrypt.js, and about 16.6% slower than node-rs/bcrypt which isn't bad given both of those are native code, and its faster than bcryptjs.

andrewmd5 added a commit that referenced this issue Feb 5, 2025
makes the package align with the benchmarks shown in #1
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants