You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
zapashcanon 87aeedfbcb
add ocamlrun wasm, change to kb bench, rework scripts
5 months ago
src add ocamlrun wasm, change to kb bench, rework scripts 5 months ago
.gitignore first commit 5 months ago
README.md add ocamlrun wasm, change to kb bench, rework scripts 5 months ago
dune first commit 5 months ago
dune-project first commit 5 months ago

README.md

wasocabench

You need wasicaml:

$ git clone git@github.com:zapashcanon/wasicaml.git
$ cd wasicaml
$ ./configure
$ make
$ ln -s ~/.wasicaml/bin/wasicaml ~/.local/bin/wasicaml

You need node-canary:

$ wget https://nodejs.org/download/v8-canary/v20.0.0-v8-canary202212266b2b946a63/node-v20.0.0-v8-canary202212266b2b946a63-linux-x64.tar.xz
$ cd node-v20.0.0-v8-canary202212266b2b946a63-linux-x64
$ ln -s $PWD/bin/node ~/.local/bin/node-canary

Benchmarks

Just run dune build @bench to get the results.

$ src/bench.sh
ocaml native   (src/b.exe)
Canonical set found :
real 0.03
user 0.03
sys 0.00

ocaml bytecode (ocamlrun src/b.bc)
Canonical set found :
real 0.15
user 0.14
sys 0.00

js_of_ocaml    (node-canary src/b.bc.js)
Canonical set found :
real 1.88
user 2.00
sys 0.05

wasicaml       (node-canary --stack-size=7936 /home/zapashcanon/.wasicaml/js/main.js src/b.wasicaml.wasm)
Canonical set found :
real 0.38
user 0.44
sys 0.03

ocamlrun wasm  (node-canary --stack-size=7936 /home/zapashcanon/.wasicaml/js/main.js /home/zapashcanon/.wasicaml/bin/ocamlrun -- /home/zapashcanon/dev/ml/wasocabench/_build/default/src/b.bc)
Canonical set found :
real 0.80
user 0.83
sys 0.02