From fb2b6c0c28dc6c9135ce5a33f87f3918c6062cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Wed, 10 Aug 2022 16:56:42 +0200 Subject: [PATCH] Use mimalloc for benchmarks on all platforms --- benchmarks/Cargo.toml | 6 ------ benchmarks/benches/formatting.rs | 5 ----- benchmarks/benches/indexing.rs | 5 ----- benchmarks/benches/search_geo.rs | 5 ----- benchmarks/benches/search_songs.rs | 5 ----- benchmarks/benches/search_wiki.rs | 5 ----- 6 files changed, 31 deletions(-) diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 1dc9941c3..e63210573 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -9,14 +9,8 @@ milli = { path = "../milli" } anyhow = "1.0.56" serde_json = { version = "1.0.79", features = ["preserve_order"] } csv = "1.1.6" - -[target.'cfg(target_os = "linux")'.dependencies] -jemallocator = "0.3.2" - -[target.'cfg(target_os = "macos")'.dependencies] mimalloc = { version = "0.1.29", default-features = false } - [dev-dependencies] heed = { git = "https://github.com/meilisearch/heed", tag = "v0.12.1" } criterion = { version = "0.3.5", features = ["html_reports"] } diff --git a/benchmarks/benches/formatting.rs b/benchmarks/benches/formatting.rs index be9d965a9..25c5a0ba8 100644 --- a/benchmarks/benches/formatting.rs +++ b/benchmarks/benches/formatting.rs @@ -2,11 +2,6 @@ use criterion::{criterion_group, criterion_main}; use milli::tokenizer::TokenizerBuilder; use milli::{FormatOptions, MatcherBuilder, MatchingWord, MatchingWords}; -#[cfg(target_os = "linux")] -#[global_allocator] -static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; - -#[cfg(target_os = "macos")] #[global_allocator] static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; diff --git a/benchmarks/benches/indexing.rs b/benchmarks/benches/indexing.rs index d0a091298..d532c85d9 100644 --- a/benchmarks/benches/indexing.rs +++ b/benchmarks/benches/indexing.rs @@ -14,11 +14,6 @@ use rand::seq::SliceRandom; use rand_chacha::rand_core::SeedableRng; use roaring::RoaringBitmap; -#[cfg(target_os = "linux")] -#[global_allocator] -static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; - -#[cfg(target_os = "macos")] #[global_allocator] static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; diff --git a/benchmarks/benches/search_geo.rs b/benchmarks/benches/search_geo.rs index 65aeef01e..faea4e3e0 100644 --- a/benchmarks/benches/search_geo.rs +++ b/benchmarks/benches/search_geo.rs @@ -5,11 +5,6 @@ use criterion::{criterion_group, criterion_main}; use milli::update::Settings; use utils::Conf; -#[cfg(target_os = "linux")] -#[global_allocator] -static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; - -#[cfg(target_os = "macos")] #[global_allocator] static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; diff --git a/benchmarks/benches/search_songs.rs b/benchmarks/benches/search_songs.rs index 05ba39cdd..a1245528f 100644 --- a/benchmarks/benches/search_songs.rs +++ b/benchmarks/benches/search_songs.rs @@ -5,11 +5,6 @@ use criterion::{criterion_group, criterion_main}; use milli::update::Settings; use utils::Conf; -#[cfg(target_os = "linux")] -#[global_allocator] -static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; - -#[cfg(target_os = "macos")] #[global_allocator] static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; diff --git a/benchmarks/benches/search_wiki.rs b/benchmarks/benches/search_wiki.rs index 20d62fba6..b792c2645 100644 --- a/benchmarks/benches/search_wiki.rs +++ b/benchmarks/benches/search_wiki.rs @@ -5,11 +5,6 @@ use criterion::{criterion_group, criterion_main}; use milli::update::Settings; use utils::Conf; -#[cfg(target_os = "linux")] -#[global_allocator] -static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; - -#[cfg(target_os = "macos")] #[global_allocator] static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;