Skip to main content

Run a subset of the pyperformance benchmarks quickly

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastmark-0.1.4.tar.gz (8.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastmark-0.1.4-py3-none-any.whl (8.6 MB view details)

Uploaded Python 3

File details

Details for the file fastmark-0.1.4.tar.gz.

File metadata

  • Download URL: fastmark-0.1.4.tar.gz
  • Upload date:
  • Size: 8.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fastmark-0.1.4.tar.gz
Algorithm Hash digest
SHA256 03d25eb2449c5032042fb8506ea5902de8dd7c9107e077e2bd23a77a8e696e4e
MD5 af2a231a5a1b0358e77d449577f3bf54
BLAKE2b-256 cc235fbe992d0e828926a1109aafcb7a354d5be76a570fc498a098b80f0242a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastmark-0.1.4.tar.gz:

Publisher: python-publish.yml on colesbury/fastmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastmark-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: fastmark-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fastmark-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 af30786521aff754054fdf4ffe89ad2196b7bab020e2ba7bd8697d7d211383a6
MD5 4c860662953915206e38d262194b683d
BLAKE2b-256 8d2dbfd9d13adc59946909ead6e4a36d920808e93c32020a126495743a2088a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastmark-0.1.4-py3-none-any.whl:

Publisher: python-publish.yml on colesbury/fastmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page