• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 25075584359 / 1
88%
main: 88%

Build:
DEFAULT BRANCH: main
Ran 28 Apr 2026 08:48PM UTC
Files 933
Run time 31s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Apr 2026 07:50PM UTC coverage: 87.576%. Remained the same
25075584359.1

push

github

web-flow
Add option to use mimalloc as global allocator (#16024)

* Add option to use mimalloc as global allocator

This commit adds a new feature to the cext and pyext crates to switch the
global allocator to use mimalloc [1] instead of the system allocator.
mimalloc promises better allocation performance and also lower resident
set size over glibc, macOS's libmalloc, or window's allocator [2]. In local
benchmarking using mimalloc improves runtime performance on transpiler
bencmarks in asv about 10% on my x86_64 benchmarking system. The
tradeoff for this is the mimalloc crate [3] internally builds and
statically links the mimalloc c library from source as part of cargo's
build process. This is all encapsulated in the mimalloc-sys's build.rs
using the cc [4] crate so it embeds very cleanly into the build system.
However, this does however require that a C compiler is available when
building from source. For building the Python package and ironically the
C standalone lib this was previously not a requirement.

When the feature is enabled it switches the global allocator to use
mimalloc. Since this is global for a compilation artifact we can only
do it once in qiskit crate, and we'll want to do it either in pyext xor
cext based on whether we're building a python extension or c standalone lib
so that only the outermost crate is opinionated about which allocator to
use. By default this feature is disabled on both crates and we opt-in to
it in the build system. For building pyext the setup.py file updates the
features we pass to setuptools-rust when building the extension to enable
the mimalloc crate and set the global allocator in the pyext code.
Similarly, the makefile is updated to do the same for build cext in
standalone mode. If we don't want to make this enabled by default
(primarily because of the dependency on a C compiler) for building from
source we can update the logic in the build scripts to expose an option
and only enable in CI for testing and for rel... (continued)

105018 of 119917 relevant lines covered (87.58%)

981198.26 hits per line

Source Files on job 25075584359.1
  • Tree
  • List 933
  • Changed 8
  • Source Changed 2
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25075584359
  • 32b3ecee on github
  • Prev Job for on main (#25062535584.1)
  • Next Job for on main (#25084622826.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc