Skip to content

Latest commit

 

History

History
 
 

bench

Benchmarking

Install Dependencies

Install HVM

See README.md in the root directory for installation instructions.

Run all benchmarks

The run.js script runs the benchmarks that generated the images in the README.md.

node run.js

Benchmarking (Nix)

Install HVM

See NIX.md in the root directory for installation instructions.

Initialise Nix development shell

# Go back to the root HVM directory.
cd ..
# Initialise the dev shell.
# The rest of the instructions in this section assume that you're using the dev
# shell.
nix develop
cd bench
cd <benchmark_directory>

Benchmark Haskell code:

ghc -O2 main.hs -o main
hyperfine --show-output ./main <arguments>

Benchmark HVM code:

hvm compile main.hvm
clang -O2 main.c -o main -lpthread
hyperfine --show-output ./main <arguments>

Run all benchmarks

Same as in the corresponding step in the "Benchmarking" section above.