Need help with iswasmfast?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

zandaqo
161 Stars 15 Forks MIT License 37 Commits 0 Opened issues

Description

Performance comparison of WebAssembly, C++ Addon, and native implementations of various algorithms in Node.js.

Services available

!
?

Need anything else?

Contributors list

# 90,070
HTML
bigint
Node.js
Python
35 commits
# 81,585
HTML
Rust
pbkdf2
pkcs12
1 commit

iswasmfast

npm Actions Status

Performance comparison of WebAssembly, C++ Addon, and native implementations of various algorithms in Node.js.

Read more in JavaScript ♥ C++: Modern Ways to Use C++ in JavaScript Projects

Benchmark

> node benchmark.js

Levenstein Distance: Native x 295,433 ops/sec ±9.40% (72 runs sampled) N-API Addon x 308,924 ops/sec ±9.46% (73 runs sampled) Web Assembly x 210,776 ops/sec ±9.16% (76 runs sampled) Fastest is N-API Addon

Fibonacci: Native x 4,044,156 ops/sec ±9.88% (61 runs sampled) N-API Addon x 5,204,691 ops/sec ±10.09% (62 runs sampled) Web Assembly x 11,508,910 ops/sec ±9.31% (74 runs sampled) Fastest is Web Assembly

Fermat Primality Test: Native x 1,678,845 ops/sec ±9.96% (65 runs sampled) N-API Addon x 1,833,692 ops/sec ±9.83% (62 runs sampled) Web Assembly x 2,402,964 ops/sec ±10.66% (72 runs sampled) Fastest is Web Assembly

Simple Linear Regression: Native x 291,985 ops/sec ±9.67% (74 runs sampled) N-API Addon x 3,710 ops/sec ±10.16% (66 runs sampled) N-API Addon using TypedArrays x 66,902 ops/sec ±8.24% (77 runs sampled) Web Assembly x 37,117 ops/sec ±10.07% (62 runs sampled) Web Assembly using TypedArrays x 42,521 ops/sec ±10.21% (64 runs sampled) Fastest is Native

SHA256: Native x 13,453 ops/sec ±15.02% (64 runs sampled) N-API Addon x 67,807 ops/sec ±10.24% (64 runs sampled) Web Assembly x 34,445 ops/sec ±10.08% (57 runs sampled) Fastest is N-API Addon

Installation

Please note that this module requires Node.js 8.6 and above. If you want to rebuild the WebAssembly module yourself, you'll also need the latest Emscripten SDK installed on your machine.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.