Metadata-Version: 2.4
Name: fastmark
Version: 0.1.4
Summary: Run a subset of the pyperformance benchmarks quickly
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: asgiref==3.3.4
Requires-Dist: certifi==2021.5.30
Requires-Dist: chameleon==3.9.1
Requires-Dist: coverage==7.12.0
Requires-Dist: django==3.2.4
Requires-Dist: docutils==0.18.1
Requires-Dist: dulwich==0.24.10
Requires-Dist: genshi==0.7.7
Requires-Dist: html5lib==1.1
Requires-Dist: legacy-cgi==2.6
Requires-Dist: mako==1.1.4
Requires-Dist: markupsafe==2.0.1
Requires-Dist: mpmath==1.2.1
Requires-Dist: networkx==3.4.2
Requires-Dist: pyaes==1.6.1
Requires-Dist: pyperf>=2.8.1
Requires-Dist: python-docs-theme==2024.6
Requires-Dist: pytz==2021.1
Requires-Dist: setuptools>=75.8.0
Requires-Dist: six==1.16.0
Requires-Dist: sphinx==7.3.7
Requires-Dist: sqlalchemy==1.3.20
Requires-Dist: sqlglot==4.6.0
Requires-Dist: sqlparse==0.4.1
Requires-Dist: sympy==1.13.1
Requires-Dist: tomli==2.0.1
Requires-Dist: tornado==6.5
Requires-Dist: webencodings==0.5.1
Requires-Dist: websockets==11.0.3

This contains scripts to run a subset of the pyperformance benchmarks quickly.


### Usage

```
PYTHON_GIL=0 PYTHONHASHSEED=0 taskset -c 4 ./python fastmark.py
```

### Other recommendations

* Disable ALSR to reduce variation: `echo 0 | sudo tee /proc/sys/kernel/randomize_va_space`
* Use `perf stat -e instructions` to record instructions executed

### Setup

First build CPython locally. It doesn't need to be installed.

Install the dependencies. If Python is executed from the source directory, then this will install the packages in `~/.local/`.

```
./python -m ensurepip
./python -m pip install -r requirements.txt
```

### Gotchas

* Python compiles `.pyc` files for packages only when they are being installed. If the `PYC_MAGIC_NUMBER` changes, then Python will recompile the bytecode while the benchmark is running, potentially distorting results. It will not update the `.pyc` files for packages in `site-packages`, only local `__pycache__` directories.
* Fixing the `PYTHONHASHSEED` reduces variation but may be inapprorpriate for commits that substantially modify dictionary representation.

### Disabled benchmarks

* connected_components, shortest_path - networkx doesn't work with free threaded Python
* django_template, json, pycparser, pylint, thrift - Pyston benchmarks not yet enabled
* sphinx - benchmark messes with `__builtins__`
* python_startup - requires separate process
