mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-04 23:03:08 +00:00
Jemalloc for EVM
Also update the version used elsewhere.
This commit is contained in:
parent
7d0ba54e40
commit
fbb26546dd
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user