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

Add @cwasm/openbsd-bcrypt and @cwasm/openwall-bcrypt to benchmark #649

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LinusU
Copy link

@LinusU LinusU commented Sep 27, 2022

Hello!

I've spent the last night compiling some bcrypt code to wasm, and wanted to see how they held up against the Rust implementation. This PR adds two new Npm packages to the BCrypt benchmark: @cwasm/openbsd-bcrypt and @cwasm/openwall-bcrypt.

These are the results on my machine:

@node-rs/bcrypt x 15.42 ops/sec ±0.67% (14 runs sampled)
node bcrypt x 16.93 ops/sec ±0.12% (15 runs sampled)
bcryptjs x 3.69 ops/sec ±0.31% (7 runs sampled)
Async hash round 12 bench suite: Fastest is node bcrypt

@node-rs/bcrypt x 15.48 ops/sec ±0.07% (14 runs sampled)
node bcrypt x 443,290 ops/sec ±0.27% (90 runs sampled)
bcryptjs x 3.69 ops/sec ±0.35% (7 runs sampled)
Async verify bench suite: Fastest is node bcrypt

@node-rs/bcrypt x 4.14 ops/sec ±0.27% (15 runs sampled)
node bcrypt x 4.55 ops/sec ±0.06% (16 runs sampled)
bcryptjs x 3.70 ops/sec ±0.09% (14 runs sampled)
wasm OpenBSD x 3.70 ops/sec ±0.04% (14 runs sampled)
wasm Openwall x 4.12 ops/sec ±0.06% (15 runs sampled)
Hash round 12 bench suite: Fastest is node bcrypt

@node-rs/bcrypt x 2,491,253 ops/sec ±0.29% (98 runs sampled)
node bcrypt x 701,746 ops/sec ±0.44% (96 runs sampled)
bcryptjs x 150,612 ops/sec ±0.32% (94 runs sampled)
wasm OpenBSD x 3,364,578 ops/sec ±0.14% (95 runs sampled)
wasm Openwall x 762,250 ops/sec ±1.75% (88 runs sampled)
genSaltSync bench suite: Fastest is wasm OpenBSD

Seems like the Openwall implementation has 99.5% of the performance of this module, for hashSync! The OpenBSD implementation has the fastest genSaltSync 🐎

@LinusU
Copy link
Author

LinusU commented Feb 19, 2023

(rebased on main)

ping @Brooooooklyn, any chance of getting this merged?

@LinusU
Copy link
Author

LinusU commented Aug 31, 2023

(rebased on main)

ping @Brooooooklyn, any chance of getting this merged?

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.

None yet

1 participant