Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/ppvm-python-native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ crate-type = ["cdylib"]

[dependencies]
bnum = "0.13.0"
mimalloc = { version = "0.1", default-features = false }
num = "0.4.3"
Comment on lines 11 to 14
paste = "1.0.15"
ppvm-runtime = { version = "0.1.0", path = "../ppvm-runtime" }
Expand Down
7 changes: 7 additions & 0 deletions crates/ppvm-python-native/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// SPDX-FileCopyrightText: 2026 The PPVM Authors
// SPDX-License-Identifier: Apache-2.0

// Use mimalloc as the global allocator. It returns freed pages to the OS
// more aggressively than the default system allocator, which materially
// reduces peak RSS on the allocation-heavy Pauli-propagation paths — each
// gate / truncation step churns large transient `Vec` / `HashMap` buffers.
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
Comment on lines +4 to +9

use pyo3::prelude::*;

pub mod interface;
Expand Down
Loading