Benchmark of different python regexp libraries on some edge cases
- Environment variable
RUNS
specifies number of runs for each call.- Recommended value is 11.
- Some libraries requires extra system libraries to be installed.
- I recommend podman/docker
Podman allows to run container in rootless mode with no effort. Docker commands will be similar.
podman build -t re-benchmark .
mkdir docker-out
podman run --rm -v $(pwd)/docker-out:/app/graphs -e RUNS=11 re-benchmark python measure_performance.py
Recommended variant because no dev libraries is needed.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
RUNS=11 python measure_performance.py
Result images will be placed in ./graphs
directory.