Skip to content

Just a naive benchmark for Native C, JavaScript and WASM implementations of Prime Number Generator.

License

Notifications You must be signed in to change notification settings

ravi9083/prime-benchmark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Naive Prime Numbers Benchmark

Just a naive benchmark for Native C, JavaScript and WASM implementations of Prime Number Generator. Not intended to be serious or/and complete assessment of the performance of the mentioned technologies.

The benchmark is computing 10⁷th prime number using Fibonacci's Trial division algorithm.

Implemented as a part of tsoding/bng project.

Dependencies

Quick Start

$ make
$ time ./prime
$ time node prime-naive.js
$ time node prime-wasm.js

Results on my machine

Environment

$ neofetch
       _,met$$$$$gg.          rexim@rexim-B590
    ,g$$$$$$$$$$$$$$$P.       ----------------
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 10 (buster) x86_64
 ,$$P'              `$$$.     Host: 20208 Lenovo B590
',$$P       ,ggs.     `$$b:   Kernel: 4.19.0-10-amd64
`d$$'     ,$P"'   .    $$$    Uptime: 1 day, 23 hours, 59 mins
 $$P      d$'     ,    $$P    Packages: 2354 (dpkg)
 $$:      $$.   -    ,d$$'    Shell: bash 5.0.3
 $$;      Y$b._   _,d$P'      Resolution: 1366x768, 1920x1080
 Y$$.    `.`"Y$$$$P"'         WM: i3
 `$$b      "-.__              CPU: Intel i5-3230M (4) @ 3.200GHz
  `Y$$                        GPU: NVIDIA GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M
   `Y$$.                      GPU: Intel 3rd Gen Core processor Graphics Controller
     `$$b.                    Memory: 2922MiB / 7816MiB
       `Y$$b.
          `"Y$b._                                     
              `"""

Runs

About

Just a naive benchmark for Native C, JavaScript and WASM implementations of Prime Number Generator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • WebAssembly 55.9%
  • JavaScript 21.3%
  • C 18.8%
  • Makefile 4.0%