Jemalloc for EVM

Also update the version used elsewhere.
This commit is contained in:
Daniel Lubarov 2022-12-04 10:15:28 -08:00
parent 7d0ba54e40
commit fbb26546dd
5 changed files with 14 additions and 3 deletions

View File

@ -29,7 +29,7 @@ RUSTFLAGS=-Ctarget-cpu=native cargo run --release --example bench_recursion -- -
## Jemalloc
Plonky2 prefers the [Jemalloc](http://jemalloc.net) memory allocator due to its superior performance. To use it, include `jemallocator = "0.3.2"` in`Cargo.toml`and add the following lines
Plonky2 prefers the [Jemalloc](http://jemalloc.net) memory allocator due to its superior performance. To use it, include `jemallocator = "0.5.0"` in`Cargo.toml`and add the following lines
to your `main.rs`:
```rust

View File

@ -31,6 +31,9 @@ sha2 = "0.10.2"
static_assertions = "1.1.0"
tiny-keccak = "2.0.2"
[target.'cfg(not(target_env = "msvc"))'.dependencies]
jemallocator = "0.5.0"
[dev-dependencies]
criterion = "0.4.0"
hex = "0.4.3"

View File

@ -30,3 +30,11 @@ pub mod vanishing_poly;
pub mod vars;
pub mod verifier;
pub mod witness;
// Set up Jemalloc
#[cfg(not(target_env = "msvc"))]
use jemallocator::Jemalloc;
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;

View File

@ -46,7 +46,7 @@ structopt = { version = "0.3.26", default-features = false }
tynm = { version = "0.1.6", default-features = false }
[target.'cfg(not(target_env = "msvc"))'.dev-dependencies]
jemallocator = "0.3.2"
jemallocator = "0.5.0"
[[bin]]
name = "generate_constants"

View File

@ -23,4 +23,4 @@ name = "lookup_permuted_cols"
harness = false
[target.'cfg(not(target_env = "msvc"))'.dev-dependencies]
jemallocator = "0.3.2"
jemallocator = "0.5.0"