aoc2025/bram/benchmarks/README.md

1.6 KiB

Benchmarking setup

In this folder, I run some benchmarks on everyone's code.

How to benchmark

  1. Make sure you have the appropriate software installed. You can do so by activating the Nix shell as defined in shell.nix, or you can view everyone's installation requirements in the software requirements section.

  2. Run benchmarks by executing the respective scripts. For example, if you wish to benchmark Bram's code, you may run bram.sh in your terminal. All data will be collected in the data/ folder.

  3. Once you have collected all the data you wanted to collect, you can open the Jupyter Notebook by typing jupyter notebook Benchmarks.ipynb in the terminal.

  4. In the Jupyter Notebook, evaluate all cells and gain the graphs you want. Graphs are also stored in the img/ folder.

Software requirements

To create the measurements, this benchmarking setup uses hyperfine. To build the visualization, this setup uses Jupyter Notebooks - but you can install the dependencies listed in requirements.txt to get all necessary packages installed.

Bob uses Python.

Bram uses Rust at version 1.86.0.

Brechtje uses Python.

Sander uses GHCup at version 9.6.7. Haskell typically opens as a REPL from which functions can be evaluated, so some liberties are taken here. The script is reformatted in the sander_hs/ folder and compiled to a binary in order to approximate performance.