Skip to content

Benchmark

Benchmark #37

Workflow file for this run

---
name: Benchmark
on:
workflow_dispatch:
permissions: {}
jobs:
benchmark:
permissions:
contents: read
packages: read
runs-on: ubuntu-22.04
env:
BENCHMARK_MAX_SIZE: 2097152
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .
pip install ".[benchmark]"
- name: Benchmark hash functions
run: |
mkdir var
declare -a hash_list=("mmh3_32" "mmh3_128" "xxh_32" "xxh_64" \
"xxh3_64" "xxh3_128" "md5" "sha1")
for hash_name in "${hash_list[@]}"; do
python benchmark/benchmark.py -o var/${hash_name}.json \
--test-hash "${hash_name}" \
--test-buffer-size-max "$BENCHMARK_MAX_SIZE"
done
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: var