This project created to test about NodeJS and Rust by comparing their performance.
Build rust lib
On linux will got libfizzbuzz.so
, macos will got libfizzbuzz.dylib
. and lib should store at /usr/lib
or /usr/local/lib
cd fizzbuzz && cargo build --release # lighter C binary file
Testing performance
cd fizzbuzz-compare && npm install && node app.js
Or easier steps
cd fizzbuzz-compare
npm run build_lib
npm start
$ node app.js
node_run: 0.337ms
rust_run: 0.161ms
Same result: true
Done in 0.12s.