python performance benchmarks
on this page
Overview
performance benchmarks for python libraries and language features.
Available Benchmarks
Data Modeling
python data models comparison - performance comparison of dataclasses, pydantic, and sqlalchemy
dataclass vs pydantic evolution - performance changes across python versions 3.10-3.14
Methodology
all benchmarks follow consistent principles:
- minimum 10,000 iterations for statistical significance
- high-resolution timing via
time.perf_counter()
- testing across multiple python versions
- real-world operations
- reproducible test scripts
Running Benchmarks
benchmark scripts are available in /public/wiki/python/benchmarks/data-models/
:
# example: data model benchmarks
cd public/wiki/python/benchmarks/data-models/
uv run --python 3.14 --with pydantic --with sqlalchemy python benchmark.py
Available Files
benchmark.py
- main benchmark scriptanalyze.py
- result analysisvisualize.py
- main visualizationvisualize_versions.py
- version comparison chartsummary.json
- aggregated resultsREADME.md
- detailed documentation
Contributing
when adding benchmarks:
- clearly describe methodology
- provide executable scripts
- test across python versions
- include visualizations
- document dependencies
See Also
- choosing a data model
- python setup 2025
- library documentation:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ