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.0.tar.gz (250.9 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.0-cp314-cp314t-win_amd64.whl (494.1 kB view details)

Uploaded CPython 3.14tWindows x86-64

mew_bench-0.1.0-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.0-cp314-cp314t-musllinux_1_2_aarch64.whl (838.7 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

mew_bench-0.1.0-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.0-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.0-cp314-cp314t-macosx_11_0_arm64.whl (270.9 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.12+Windows x86-64

mew_bench-0.1.0-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.0-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.0-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.0-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.0-cp312-abi3-macosx_11_0_arm64.whl (267.3 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

mew_bench-0.1.0-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.0-cp311-cp311-musllinux_1_2_aarch64.whl (837.3 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

mew_bench-0.1.0-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.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: mew_bench-0.1.0.tar.gz
  • Upload date:
  • Size: 250.9 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.0.tar.gz
Algorithm Hash digest
SHA256 5c66be6d2b8c2cfe2279c0540f9ed516635a593c79381530d390d9262a5366ce
MD5 5c94b531a8ea6056b4f8cc8cfe2dc47f
BLAKE2b-256 ecd9b4d8fdd057067054c2ebb9305f8d055d6d6751ebc8451e5237853fa258c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0.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.0-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: mew_bench-0.1.0-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.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 7127ae98478b77c50f4228900a7435fce3748af779f3532a3281a46d09ded82c
MD5 23878ef3797de63ff61d612687684cd5
BLAKE2b-256 3917c84cb8a5e26ae2c5a5cc25cea9e30201eba07454a238ba60ea1ad6c7eceb

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d40976fdb15b46786a432cc8315c4c6a342a7c45cb068f2a0835472ba956f62e
MD5 276d0ad26ae5ecd3790566de9b169553
BLAKE2b-256 388cfb9d3e6f030a860073c39467fcc9260b6e796699975b8b510ac6cde88ab3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 90212d66972222814e9cb0d3800e8a15d7954439fc78ab630c9313ab0ae45777
MD5 11b0ebe3fed7202c15c7ec781ba439f6
BLAKE2b-256 3a590959bca8e504dfdbf0eca3129686c77034081dcb9979b8384b5ac78e1cab

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a876357800a2221ce8620c1765706f986082c9d995998dbc300840f4a8f94488
MD5 805c0988d298ac7a8927b136a518acc8
BLAKE2b-256 7825677d98ecf61728c9f2d71969721f96ef0979dd967015de2018d390cd3c4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e4b05d59c4732fbf523d89b4459004303c7b9d2012930c3c022f9985ef02641f
MD5 e35f749c138caced169c1855bee1800a
BLAKE2b-256 5a48dad58303979ab6cdf5f5ac122778b51bf4fd5a71a29e189871ef40b125e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0850236c8d8e82ab92c4ba1759abb27361582e6336cef02735a60009d70c1938
MD5 bdf82463494011e0c9b972ee513a528f
BLAKE2b-256 ae66ce8d286a8bed1a8f138edfcb4c44112459c8e2f75d7545271b3f3db2270e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: mew_bench-0.1.0-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.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 55bbb84810be2a862b4d45099aaefb7d6d1d048a7abcded14b0a8c508feb147a
MD5 b891c0ddbbec498243893f96011c4d5e
BLAKE2b-256 f9d66528cf96e854f26a4205a7de8fa772c843efdfa4289eadb21bc32815df74

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5fbdf69df00eaa81811c8045e00b2e438ec4d199edb0057eb0983e9ac5f0ffa7
MD5 6959ea724fb30fa9d3902c402c511cea
BLAKE2b-256 956fbf9c05849baadd176b6c2a0ea29eba78d6034bb2331e135a233b67ea45cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp312-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp312-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 80edb3ae2d3fb64365d41bf17af0666a449493956bd35a61732639fb481f1380
MD5 5df98748832326c46dfa444df15710aa
BLAKE2b-256 c7cb3c0c352e2c7edd40fcf10704207075b8683e6fc78d3c51a9b648f2f8a452

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 68c21ed08cbb00cc41ce41e7288aec03a5178efa770f597852cd8d73a7a63141
MD5 6cc2f6859874ff899cc1a64d8b25f503
BLAKE2b-256 0bc16ec933ded8863ec814bf82e407b210241fe84b997be16e93d9523762c6b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 543d98462f5f2e4b87ede481cb7a4387888b17eb6eadec0a0c2ee6d2f6cc600e
MD5 ba8d3da96810bd7b1ac98523283b0b85
BLAKE2b-256 d974da164053200bc31a99e7e3a20892e0f8c7e0b8ab18635aa03eef20893e69

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 484f156f3739b6dbe5c4927c22a4509ce6381c1a9da95be044f63024216a9475
MD5 22ab3d356675af045792dc0046d390e6
BLAKE2b-256 b5628d67dd61af20041e61e6d54b4ca6d5b84d6d48f210465035eb70b04eb5e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mew_bench-0.1.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1ecc8919bcb9ddc2f4355a32b23affbdc7bb66df8b1681199dfa83edf0ef72f2
MD5 26a963fe2fc12b3ef9d516b840a674d2
BLAKE2b-256 570f613e120928f4f5476e8d8992c79a1d36dc28ad79ad68e22a9e672f7d7a3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4a60394374423e7b65aa3d0c5c20683c7c3498f5afbc795a80a02f567f39ff67
MD5 5ae9ec18c520174243464c3e2c65d59a
BLAKE2b-256 3ffb486a022ff2e0c931b030bca3f5eaed1ba7af851dba43fbe3e696508cdc6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp311-cp311-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f53c69559f31702f85f72982a53c136e742d15b8a6f021f33aad036b1eae5b51
MD5 39e1f93d9b74ac7ca4b3c5e574278b2b
BLAKE2b-256 317317909b6b902c243c606f19146e1ebe52e40cdc2ab0e5e74a7084e1ca2605

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 33b92a35c28414b626af5fe9125f89ca7decab9684028763a4952877f05bb5cd
MD5 753d0ad1eb00192c7ade9d9aae3af03d
BLAKE2b-256 b91dafb9df4d97e77f5430a16987839fa6fbc5ccfd15612de619839637b58cea

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bbf1f14117eaeb77468a8fe8340b6945080d6d315ccc35d2eb9c2738ea14cafb
MD5 3ab673824068c51597d21ad5210d894f
BLAKE2b-256 90ed170615a630a3f0ffecc65c520a15e44e8f60fe3d38a952468657aaa905b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mew_bench-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de0d689971ebfbb6196a470d30ca0c8cd136f3a477f83a0d241ac0219e2de136
MD5 220e9e21d9962a64265e37140309faa6
BLAKE2b-256 36ae1f636e930c16ed673bb27f4550ba43ecb7662bd9a997964cfbeb943f9502

See more details on using hashes here.

Provenance

The following attestation bundles were made for mew_bench-0.1.0-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