Skip to content

Commit

Permalink
Replace jemalloc with mimalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
tats-u committed Nov 20, 2024
1 parent 0ee5617 commit c42bce4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions charabia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ german-segmentation = []
criterion = "0.5"
quickcheck = "1"
quickcheck_macros = "1"

[target.'cfg(any(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64", all(target_arch = "powerpc64", target_endian = "little"))), all(target_os = "macos", target_arch = "aarch64")))'.dev-dependencies]
jemallocator = "0.5.4"
mimalloc = "0.1.43"

[[bench]]
name = "bench"
Expand Down
4 changes: 2 additions & 2 deletions charabia/benches/bench.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use charabia::{Language, Script, Segment, Tokenize};
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
use mimalloc::MiMalloc;

#[cfg(any(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64", all(target_arch = "powerpc64", target_endian = "little"))), all(target_os = "macos", target_arch = "aarch64")))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static GLOBAL: MiMalloc = MiMalloc;

static DATA_SET: &[((usize, Script, Language), &str)] = &[
// short texts (~130 bytes)
Expand Down

0 comments on commit c42bce4

Please sign in to comment.