Skip to main content

mew

Documentation Status CI

A tool for microbenchmarking Python code, powered by Google Benchmark.

import mew


@mew.benchmark
def bench_sorted(state: mew.State) -> None:
    data = list(range(1000, 0, -1))
    for _ in state:
        sorted(data)
$ mew run
mew · host=laptop cpus=10 @ 3200MHz scaling=enabled
Benchmark                              │     Iters │       Real │        CPU
────────────────────────────────────────────────────────────────────────────
benchmarks/bench_sort.py::bench_sorted │ 1,000,000 │   32.10 ns │   32.05 ns
  • Decorate: @mew.benchmark, @mew.parametrize, @mew.product register one benchmark or a benchmark family.
  • Run: mew run discovers bench_*.py files, streams results to a formatted table, JSON, or a JSONL archive.
  • Profiling: mew run --sample (in-process pyinstrument) and --profile-memory (memray allocations) in the same run; mew profile for native C frames via xctrace / py-spy / perf.
  • Compare: mew compare head.json baseline.json --regression-threshold 5% --exit-non-zero-on-regression for CI jobs.

Installation

$ uv add mew-bench                 # or: pip install mew-bench
$ uv add 'mew-bench[cpu,memory]'   # opt-in profilers

Requires Python 3.11+. A pre-built wheel is installed where available; otherwise the C++ extension is compiled via CMake + nanobind.

Docs

License

This project is licensed under the Apache-2.0 license.

Download files

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

Source Distribution

mew_bench-0.1.1.tar.gz (251.8 kB view details)

Uploaded Source

Built Distributions

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

mew_bench-0.1.1-cp314-cp314t-win_amd64.whl (494.1 kB view details)

Uploaded CPython 3.14tWindows x86-64

mew_bench-0.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl (883.8 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

mew_bench-0.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl (838.7 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

mew_bench-0.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (386.2 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

mew_bench-0.1.1-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (354.8 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

mew_bench-0.1.1-cp314-cp314t-macosx_11_0_arm64.whl (270.9 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

mew_bench-0.1.1-cp312-abi3-win_amd64.whl (476.6 kB view details)

Uploaded CPython 3.12+Windows x86-64

mew_bench-0.1.1-cp312-abi3-musllinux_1_2_x86_64.whl (878.9 kB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ x86-64

mew_bench-0.1.1-cp312-abi3-musllinux_1_2_aarch64.whl (832.6 kB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ ARM64

mew_bench-0.1.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (381.6 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

mew_bench-0.1.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (349.8 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

mew_bench-0.1.1-cp312-abi3-macosx_11_0_arm64.whl (267.3 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

mew_bench-0.1.1-cp311-cp311-win_amd64.whl (478.9 kB view details)

Uploaded CPython 3.11Windows x86-64

mew_bench-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl (883.8 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

mew_bench-0.1.1-cp311-cp311-musllinux_1_2_aarch64.whl (837.3 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

mew_bench-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (386.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

mew_bench-0.1.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (353.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

mew_bench-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (269.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file mew_bench-0.1.1.tar.gz.

File metadata

  • Download URL: mew_bench-0.1.1.tar.gz
  • Upload date:
  • Size: 251.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mew_bench-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a8a528ad49e2cfa8436bfaf61970517f80a349a1bfbc021e259959960292e4b3
MD5 be66544bfb75443f50fcf7bcd61fbda3
BLAKE2b-256 3d1255e41e88c3e6ba06d7dd51a724166d30d8b30f76d6481ba473e6f3ebbabd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1.tar.gz:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: mew_bench-0.1.1-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 494.1 kB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mew_bench-0.1.1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 3fd07d28f46cad16ddb68f94d8c451ba08fabee4d120eb416aa09844534769c8
MD5 bf2aee96451a48e15b87b74d05fd45cc
BLAKE2b-256 34da2bca043ae595a862437b5f3587255f8e1a647eb6e41a3c1791625fc04238

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp314-cp314t-win_amd64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5b91fa40d2cc0a390b006d3a7a1efbb62aad5128d149dae0da19cea46593dc14
MD5 c457a1d606ce8c1b373a5a25ab6674ac
BLAKE2b-256 78340045f9bc25b286d4ac9c6d892150a83e396a17731397c42cb28899daf43a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 74c77352417bb9ed77ec99deb3e56cae4899ab29264210717a2d472625a4a1a5
MD5 110d09c67aa9aef3672556cdcbfd7473
BLAKE2b-256 2233df0b8f5cf04383a61521bace99aa5fee93217bf245c987b89e36675f9af7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5983a94c73483ddaaf5f4bfed0b88f9a1b8e14f3923fd7d4e97abcdda3ea3b7b
MD5 909a9004d8053ddce3b9c05f1d837527
BLAKE2b-256 98051c37c48ab2740b1ebb0f710fd8852dceea7a92508b5008affa3dadc53b21

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 187e9412bc7bedd5cb8be3d7a355b7ea4957d520b544a1f9c0b143080bad281e
MD5 2d4b3ab7945a38e3d646744c3e3df768
BLAKE2b-256 cdf1b19c189b4fdfda670583d719a67675be8e470dedcc4772f45acd83d475ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d6376fc98c8c9656f87120a6baddead0e0aa5fbe6d3018a0e6bd53b44a7c321
MD5 09ba927ae281ef6a19c80efa1e5f8905
BLAKE2b-256 b02a47f571a4f30f8800f25d94d0d006d68a3b8ae11c6f6c878a567ba81fd0dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp314-cp314t-macosx_11_0_arm64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: mew_bench-0.1.1-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 476.6 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mew_bench-0.1.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3ba4a78dbaf864dce2498bd0202a6a733fb5a084a3e3911642e930c7663a0869
MD5 3f5bdfd8e4470afea8b4246f6e6f477d
BLAKE2b-256 0c62b1ecec1b1d5d23a4501aab4c8778b5d6e63c8d7f49a1bad76605a038744d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp312-abi3-win_amd64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4917547fee5c83be77817b9b1016de493522603963642216ef853778f4ce3414
MD5 65839fb60e673402eacb6299694b515b
BLAKE2b-256 7e5c4ac401901c22a7ca65c26c784f80aea449d9302ef4a114b05a3b7f62a808

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp312-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp312-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp312-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 23e6f979fa2b01133a77359c9ab5784e4f1c041cd0bb2484a3e0d154ee98aa8e
MD5 24e179517601ae9cca3775b3296557fc
BLAKE2b-256 f2c15a00b6aa5d751f178c72ca6708fdf448646e199752f22928a62641e13c78

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp312-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8a17e0f6cc9e4c0904e804f14f0ca705e4df22f09c78fbc6ede9a38d6b9ffcc9
MD5 4078f51fefe39d985c99d6fd63624811
BLAKE2b-256 c37f049a6dc51b73872dbf83f6348818f3bf06585456d5ed030dfda8e5d70b9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 792c0e78d8b2cf80af6e31f9738f56052f9827737363a44f0c2e7ea22d50e4e9
MD5 696884a1932ff7aba2a5928cefff3af0
BLAKE2b-256 0fa5e778c67fa348dfb90aca63b55be4eec5b29390f572559b08b480429cbc5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71269e28ae56227451e18315adffff7c189f46c35105f9d9bb7806d307858a89
MD5 60abce5007cd7a53530bff80d45961a8
BLAKE2b-256 81246250b37bf1f6da8c7d2e22ac5c3ec253beab810c110e416230fdca006a23

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mew_bench-0.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 478.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mew_bench-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 742a6dbbdf6251d0c0507d9d2d69b8b8fba2d94772b7c469d9ed13c661ab3f04
MD5 5b42e3b23f57eeeffca8f6d8c238dfdb
BLAKE2b-256 9431060caa35e0f250e1fe04dd5f58e7f893840d87c9546ccbb6aed7a9ee0d4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp311-cp311-win_amd64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2c380e75f7d12a526bacf2d74ed43191ab2150aaf04a0f393c28d4f7ce43d02e
MD5 31d7e6858f14e5f83f599e1e923b268a
BLAKE2b-256 e93b3e7925bac734cfe1846bc35c0d18a598215593eb8dda46ef9a087f65474b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp311-cp311-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 04699bd664684b51a75cb0a3c6834578408b1673f7e9273b40efc6901dff6883
MD5 11b6dd01b10e68fc5617b59b20438e2d
BLAKE2b-256 26a7ee897126a5a864e2fcb2245e17002a955e0baf0590cb1cf7525a91f06e2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp311-cp311-musllinux_1_2_aarch64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 966ce25e40930484c39e5781f00097e1e318c0f2c9e29a7d6463272d64ec5b9f
MD5 2d0152ea87a3f2d8c61b7ec3a6c46a5e
BLAKE2b-256 ea211f82cae952352a9b950fc82d3957b1178ab5684fec46623f765369037803

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bc386f2de9c980a35966f0d71d52be80eeb916770b3d3c9b651072ea7a723591
MD5 0aef1f56498817d2c5635bdfa0ab5cc4
BLAKE2b-256 da04eea8959a1305677f918bdd63484bc129cbe5edec3b0799360227ea7cc74a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yml on nicholasjng/mew

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

File details

Details for the file mew_bench-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b1687a4c6c39e5551c2e50a60c0afb76a5022d411e9ba69066863d703e824d6
MD5 2b525f07b047a4cfef2ece01905ae453
BLAKE2b-256 c1d541dc407196c5def8e50ce6da987044a63aa896bb9c9a35b970d90e6ba64e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on nicholasjng/mew

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