diff options
Diffstat (limited to 'tvix/eval')
-rw-r--r-- | tvix/eval/Cargo.toml | 3 | ||||
-rw-r--r-- | tvix/eval/benches/eval.rs | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tvix/eval/Cargo.toml b/tvix/eval/Cargo.toml index cc590791cc92..4cf8ea146cf8 100644 --- a/tvix/eval/Cargo.toml +++ b/tvix/eval/Cargo.toml @@ -42,6 +42,9 @@ pretty_assertions = "1.2.1" rstest = "0.19.0" tempfile = "3.3.0" +[target.'cfg(not(target_env = "msvc"))'.dev-dependencies] +tikv-jemallocator = "0.5" + [features] default = ["impure", "arbitrary", "nix_tests"] diff --git a/tvix/eval/benches/eval.rs b/tvix/eval/benches/eval.rs index 57d4eb71b59f..1333f5018cb3 100644 --- a/tvix/eval/benches/eval.rs +++ b/tvix/eval/benches/eval.rs @@ -1,5 +1,11 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; use itertools::Itertools; +#[cfg(not(target_env = "msvc"))] +use tikv_jemallocator::Jemalloc; + +#[cfg(not(target_env = "msvc"))] +#[global_allocator] +static GLOBAL: Jemalloc = Jemalloc; fn interpret(code: &str) { tvix_eval::Evaluation::new_pure().evaluate(code, None); |