Skip to content

Commit dd4f027

Browse files
Merge branch 'main' into 422
2 parents 64c7eeb + 92747ed commit dd4f027

34 files changed

Lines changed: 1198 additions & 44 deletions

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ updates:
88
actions:
99
patterns:
1010
- "*"
11+
cooldown:
12+
default-days: 7
1113

1214
- package-ecosystem: "pip"
1315
directory: "/"
1416
exclude-paths:
1517
- "pyperformance/data-files/**"
1618
schedule:
1719
interval: "monthly"
20+
cooldown:
21+
default-days: 7

.github/workflows/lint.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@ on: [push, pull_request, workflow_dispatch]
44

55
permissions: {}
66

7+
env:
8+
FORCE_COLOR: 1
9+
RUFF_OUTPUT_FORMAT: github
10+
711
jobs:
812
lint:
913
runs-on: ubuntu-latest
14+
1015
steps:
11-
- uses: actions/checkout@v6
12-
- uses: tox-dev/action-pre-commit-uv@v1
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
persist-credentials: false
19+
- uses: j178/prek-action@cbc2f23eb5539cf20d82d1aabd0d0ecbcc56f4e3 # v2.0.2

.github/workflows/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,16 @@ jobs:
5252
python: "3.14"
5353
experimental: false
5454
steps:
55-
- uses: actions/checkout@v6
55+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
56+
with:
57+
persist-credentials: false
5658
- name: Set up Python ${{ matrix.python }}
57-
uses: actions/setup-python@v6
59+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5860
if: "!endsWith(matrix.python, '-dev')"
5961
with:
6062
python-version: ${{ matrix.python }}
6163
- name: Set up Python ${{ matrix.python }} using deadsnakes
62-
uses: deadsnakes/action@v3.2.0
64+
uses: deadsnakes/action@e640ac8743173a67cca4d7d77cd837e514bf98e8 # v3.2.0
6365
if: "endsWith(matrix.python, '-dev')"
6466
with:
6567
python-version: ${{ matrix.python }}

.github/workflows/mypy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ jobs:
1414
name: Check code with mypy
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v6
18-
- uses: actions/setup-python@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
with:
19+
persist-credentials: false
20+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1921
with:
2022
cache: "pip"
2123
cache-dependency-path: "pyproject.toml"

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
id-token: write
1616

1717
steps:
18-
- uses: actions/checkout@v6
18+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
with:
20+
persist-credentials: false
1921
- name: Set up Python
20-
uses: actions/setup-python@v6
22+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2123
with:
2224
python-version: '3.x'
23-
cache: pip
24-
cache-dependency-path: pyproject.toml
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade build
@@ -30,4 +30,4 @@ jobs:
3030
python -m build
3131
- name: Publish distribution 📦 to PyPI
3232
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
33-
uses: pypa/gh-action-pypi-publish@release/v1
33+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0

.pre-commit-config.yaml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: ^pyperformance/data-files/
22
repos:
33
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.13.1
4+
rev: v0.15.11
55
hooks:
66
- id: ruff-check
77
name: Run Ruff (lint)
@@ -10,12 +10,33 @@ repos:
1010
name: Run Ruff (format)
1111
args: [--exit-non-zero-on-fix]
1212

13+
- repo: https://github.com/python-jsonschema/check-jsonschema
14+
rev: 0.37.1
15+
hooks:
16+
- id: check-dependabot
17+
- id: check-github-workflows
18+
19+
- repo: https://github.com/rhysd/actionlint
20+
rev: v1.7.12
21+
hooks:
22+
- id: actionlint
23+
24+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
25+
rev: v1.23.1
26+
hooks:
27+
- id: zizmor
28+
1329
- repo: https://github.com/tox-dev/pyproject-fmt
14-
rev: v2.6.0
30+
rev: v2.21.1
1531
hooks:
1632
- id: pyproject-fmt
1733

1834
- repo: https://github.com/abravalheri/validate-pyproject
19-
rev: v0.24.1
35+
rev: v0.25
2036
hooks:
2137
- id: validate-pyproject
38+
39+
- repo: meta
40+
hooks:
41+
- id: check-hooks-apply
42+
- id: check-useless-excludes

doc/benchmark.conf.sample

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ pgo = True
5151
# PYTHON_JIT=0 can be used to disable the micro-op interpreter at runtime.
5252
jit = no
5353

54+
# Tail-calling interpreter?
55+
tail_call_interp = False
56+
5457
# The space-separated list of libraries that are package-only,
5558
# i.e., locally installed but not on header and library paths.
5659
# For each such library, determine the install path and add an
@@ -96,6 +99,8 @@ affinity =
9699
# disabled.
97100
upload = False
98101

102+
# --rigorous option for 'pyperformance run'
103+
rigorous = False
99104

100105
# Configuration to upload results to a Codespeed website
101106
[upload]

doc/benchmarks.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,48 @@ These benchmarks also have an "eager" flavor that uses asyncio eager task factor
7676
if available.
7777

7878

79+
base64
80+
------
81+
82+
Benchmark the ``base64`` module's encoding and decoding functions. Each
83+
algorithm has ``_small`` and ``_large`` variants that test both encode and
84+
decode in a single benchmark:
85+
86+
* ``_small``: Balanced iterations across 20B, 127B, 3KiB, and 9KB data sizes
87+
more likely to show the impact of overhead.
88+
* ``_large``: Large data focus with 100KiB and ~1MiB data sizes likely to
89+
demonstrate implementation efficiency.
90+
91+
Available benchmarks:
92+
93+
* ``base64_small``, ``base64_large``: Standard Base64 encoding and decoding
94+
* ``urlsafe_base64_small``: URL-safe Base64 (small only, as URLs shouldn't
95+
contain huge data)
96+
* ``base32_small``, ``base32_large``: Base32 encoding and decoding
97+
* ``base16_small``, ``base16_large``: Base16/hex encoding and decoding
98+
* ``ascii85_small``, ``ascii85_large``: Ascii85 encoding and decoding
99+
(includes ``wrapcol=76`` code path)
100+
* ``base85_small``, ``base85_large``: Base85 encoding and decoding
101+
102+
See the `base64 module <https://docs.python.org/dev/library/base64.html>`_.
103+
104+
105+
btree
106+
-----
107+
108+
Benchmark a pure-Python implementation of a B-tree data structure. The tree
109+
is created with a relatively large number of nodes (default is 200,000). This
110+
attempts to simulate an application that operates on a large number of objects
111+
in memory (at least, large compared to other benchmarks currently in this
112+
suite). There are two variations of this benchmark: `btree` records the time to
113+
create the B-tree, run `gc.collect()` and then do some operations on it; the
114+
`btree_gc_only` variant records only the time to run `gc.collect()` and it
115+
skips the operations after creation.
116+
117+
Note that this benchmark does not create any reference cycles that the garbage
118+
collector will need to break to free memory.
119+
120+
79121
chameleon
80122
---------
81123

doc/changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
=========
33

4+
Version 1.14.0
5+
--------------
6+
* Bump ``pyperf`` to 2.10.0
7+
* Add base64 module benchmark (b64, b32, b16, a85, b85)
8+
* Add FastAPI HTTP benchmark
9+
* Add YAML parsing benchmark
10+
* Respect rigorous setting in benchmark configuration files
11+
412
Version 1.13.0 (2025-10-27)
513
--------------
614
* Re-enable xdsl benchmark

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# built documents.
5656
#
5757
# The short X.Y version.
58-
version = release = "1.0.6"
58+
version = release = "1.14.0"
5959

6060
# The language for content autogenerated by Sphinx. Refer to documentation
6161
# for a list of supported languages.

0 commit comments

Comments
 (0)