Benchmarks comparing Python concurrency models--threads, Queue-based multiprocessing, and SharedMemory-based multiprocessing--for moving and processing NumPy arrays.
Project description
ipc-frontier-py
ipc-frontier-py implements benchmarks comparing Python concurrency models--threads, Queue-based multiprocessing, and SharedMemory-based multiprocessing--for moving and processing NumPy arrays. The benchmarks highlight throughput, latency, and IPC overheads relevant to ML/AI data pipelines and performance-sensitive Python applications.
TODO
📝 Benchmark Analysis
For an analysis and discussion of the benchmark results, see the accompanying blog post ➡️ Benchmarking Python Concurrency Models for NumPy Array Operations. ⬅️
The write-up interprets the benchmark data, compares concurrency mechanisms in practical terms, and draws lessons for building efficient ML/AI workloads in Python.
▶️ Running the Benchmarks
You can run ipc-frontier-py benchmarks either (a) locally on your Mac or Linux workstation or (b) inside a Docker container for a fully reproducible environment.
A tooling suggestion: prefer Docker for full reproducibility and when sharing results; prefer local runs for fast edit–run cycles and debugging.
Run Locally
The ipc-frontier-py project makes it easy to develop the ipc_frontier package and do benchmark runs on a local machine.
Prerequisites: Linux or macOS, GNU Make. (The Makefile will install Pyenv and Poetry.)
Procedure: Note that the first two steps only need to be completed once per clone of the project repo.
-
Install prerequisites (once per machine):
make install-toolsThis installs Pyenv and Poetry.
-
Create a runtime environment (once per repo clone):
make setupThis downloads the pinned Python version, creates a local virtual environment, and installs the package and dev dependencies.
-
Run the benchmarks with default parameters:
poetry run ipc-frontier --out "./results/bench_$(date -u +'%Y-%m-%dT%H-%M-%SZ').jsonl"
This command writes benchmarking results to a timestamped JSONL file under
results/.
Run in Docker
Running the benchmarks in Docker ensures a clean, reproducible runtime without requiring any local software installs.
Prerequisites: Linux or macOS. Docker installed with the Docker daemon running.
Procedure: Run the docker-bench target to execute a benchmarking run with default paramters.
make docker-bench
This target:
- Builds the multi-stage image for
ipc_frontierdefined in the Dockerfile. - Runs the
ipc-frontierentrypoint of the container with the default benchmarking parameters. - Writes results to a timestamped JSONL file under
results/.
📖 Documentation
The ipc-frontier-py documentation site provides a browsable and searchable reference for the package's modules, classes, and functions. Use the doc site to dig into both the package's public interfaces and its internal implementation details.
The site is automatically generated with pdoc from the package’s source code docstrings. The static site contents are hosted on GitHub Pages. This site is built by the pages GitHub Actions workflow from the latest content of the main branch.
🛠️ Development
This section contains info about developing the ipc_frontier Python package itself.
First time working on the project? Run
make install-toolsthenmake setup.
Requirements
Supported on Linux and macOS.
Contributing Code
See CONTRIBUTING.md for the pull request process used to introduce code changes.
Releases
See RELEASE.md for a description of the GitHub pipeline that builds and publishes new versions of the ipc_frontier package.
Tooling
The ipc-frontier-py project uses Pyenv for Python version management and Poetry for package management, environment management, and builds.
The ipc-frontier-py project uses Make to automate common development operations and workflows. Run make help or see the Makefile in the root of the repository for a full list of the available targets. See the "Make Targets" section below for guidance using selected targets.
Make Targets
This section describes how and when to use the automated procedures for common development tasks.
install-tools
make install-tools
Installs the tools required to run other targets. Tools include Pyenv and Poetry. This target only needs to be run once per user.
setup
make setup
Creates an isolated execution environment to run the project. This target installs the required version of Python using Pyenv and creates a virtual environment using Poetry with the required dependencies plus the ipc_frontier package itself installed.
fmt
make fmt
Autoformats the entire codebase in compliance with the project's style standards. All formatting is handled by Ruff in a way that mimics the combination of Black + autopep8 + isort.
test
make test
Executes type checks and runs the suite of unit tests. Pyright is used for type checking, and pytest is used as the unit test framework.
clean
make clean
Deletes build/test/coverage artifacts, including .pytest_cache/, .mypy_cache/, and .ruff_cache/.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ipc_frontier_py-0.1.11.tar.gz.
File metadata
- Download URL: ipc_frontier_py-0.1.11.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28e19d808f4c281ba77e6c2a2fa24a32310b9a624aca967a3a45387753d785fa
|
|
| MD5 |
50f685b4ee9e10e96cdc1856ef045e62
|
|
| BLAKE2b-256 |
3c72685571fa6cf52ca4d8f1ce58e59d86e2fe945d8b70ca5dd69022c71b8e97
|
Provenance
The following attestation bundles were made for ipc_frontier_py-0.1.11.tar.gz:
Publisher:
release.yaml on ryancswallace/ipc-frontier-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipc_frontier_py-0.1.11.tar.gz -
Subject digest:
28e19d808f4c281ba77e6c2a2fa24a32310b9a624aca967a3a45387753d785fa - Sigstore transparency entry: 543066951
- Sigstore integration time:
-
Permalink:
ryancswallace/ipc-frontier-py@7f0df7af4c1cbe09e54299f9ccdeee2ee56ec1c6 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/ryancswallace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@7f0df7af4c1cbe09e54299f9ccdeee2ee56ec1c6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ipc_frontier_py-0.1.11-py3-none-any.whl.
File metadata
- Download URL: ipc_frontier_py-0.1.11-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d49c9982cf62924d6a367ccf9b673c28ed944d73bd3b58bcd6e2fbe10919bd1b
|
|
| MD5 |
76f9d9a57337132874e36b6ac217f429
|
|
| BLAKE2b-256 |
564be0409abe38c908bc739a17067454e4f6abb6550b317c7f838a0dc06ac454
|
Provenance
The following attestation bundles were made for ipc_frontier_py-0.1.11-py3-none-any.whl:
Publisher:
release.yaml on ryancswallace/ipc-frontier-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipc_frontier_py-0.1.11-py3-none-any.whl -
Subject digest:
d49c9982cf62924d6a367ccf9b673c28ed944d73bd3b58bcd6e2fbe10919bd1b - Sigstore transparency entry: 543066952
- Sigstore integration time:
-
Permalink:
ryancswallace/ipc-frontier-py@7f0df7af4c1cbe09e54299f9ccdeee2ee56ec1c6 -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/ryancswallace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@7f0df7af4c1cbe09e54299f9ccdeee2ee56ec1c6 -
Trigger Event:
push
-
Statement type: