/Muenchausen-numbers-napi-rs-test

Contains a performance comparison between a plain JavaScript implementation and a Rust implementation (using NAPI-RS) of the Münchausen numbers algorithm. The project demonstrates the use of JavaScript, Node.js, Rust, and NAPI-RS to calculate Münchausen numbers up to 440,000,000. The results of the comparison are documented in the README file.

Primary LanguageMakefileThe UnlicenseUnlicense

Compare Münchausen numbers with plain js and napi-rs

This is a simple comparison between a plain JavaScript implementation and a NAPI-RS implementation of the Münchausen numbers algorithm.

Result

img.png

How to build

cd test
yarn install
yarn build

How to run

nvm use 20
echo "--- Plain JS ---"
node plainJs.js

echo "--- NAPI-RS ---"
node rustModule.js