Skip to content

bench(bcrypt): add @cwasm/openbsd-bcrypt and @cwasm/openwall-bcrypt to benchmark - #649

Merged
Brooooooklyn merged 3 commits into
napi-rs:mainfrom
LinusU:bcrypt-wasm-bench
Oct 26, 2024
Merged

Brooooooklyn merged 3 commits into
napi-rs:mainfrom
LinusU:bcrypt-wasm-bench

Conversation

@LinusU

@LinusU LinusU commented Sep 27, 2022

Copy link
Copy Markdown
Contributor

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

LinusU commented Feb 19, 2023

Copy link
Copy Markdown
Contributor Author

(rebased on main)

ping @Brooooooklyn, any chance of getting this merged?

@LinusU
LinusU force-pushed the bcrypt-wasm-bench branch from 4833262 to f3d899f Compare August 31, 2023 08:22
@LinusU

LinusU commented Aug 31, 2023

Copy link
Copy Markdown
Contributor Author

(rebased on main)

ping @Brooooooklyn, any chance of getting this merged?

@Brooooooklyn
Brooooooklyn force-pushed the bcrypt-wasm-bench branch 2 times, most recently from fbeafe1 to fd3a5d9 Compare October 26, 2024 16:05
@Brooooooklyn Brooooooklyn changed the title Add @cwasm/openbsd-bcrypt and @cwasm/openwall-bcrypt to benchmark bench(bcrypt): add @cwasm/openbsd-bcrypt and @cwasm/openwall-bcrypt to benchmark Oct 26, 2024
@Brooooooklyn

Copy link
Copy Markdown
Member

@LinusU Sorry, I just missed your pr and comments :(

@Brooooooklyn
Brooooooklyn merged commit 50be77d into napi-rs:main Oct 26, 2024
@LinusU
LinusU deleted the bcrypt-wasm-bench branch October 30, 2024 08:19
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