This repository is used to benchmark NodeJS, Python, rhai, koto, and NBCL.
Note
NodeJS and Python are likely to perform badly in tests like this because of their VM startup time and other factors. In long running programs, the cost will go down significantly and NodeJS and Python will most likely out perform the other engines.
But, no one is going to write long running programs in these languages. This showcases why they are the best for embedding purposes.
- Run
cargo build --releaseto compile the nbcl, koto, and rhai launcher. - Run
bench.pyto run and generate the results.
Lower is better in all these scenarios:
Find fibonacci of 5000. This tests all the languages in a tight loop.
Find fizzbuzz of 5000. This tests all the languages in a tight loop.
Find the 10000 prime number. This is more of a real-world test case which is more accurate than Fizzbuzz and Fibonacci. The NodeJS and Python VM's are likely to dominate this test as it is not all about startup time anymore.
Finds the fastest parser. This test is mostly oriented towards the Rust engines and tests their startup time. NodeJS and Python are likely to struggle (especially NodeJS because of JIT) because of their massive VM sizes and cost of startup.



