Skip to content

Commit

Permalink
Merge #315
Browse files Browse the repository at this point in the history
315: Replace jemalloc(ator) with mimalloc, which covers wider platforms r=ManyTheFish a=tats-u

# Pull Request

## Related issue

Fixes #314

## What does this PR do?
The platforms supported by jemallocator are [limited](https://github.com/tikv/jemallocator?tab=readme-ov-file#platform-support). I use Windows but can't build charabia due to it. It should be disabled in unsupported platforms. It is used only for benchmarks.

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Tatsunori Uchino <[email protected]>
Co-authored-by: Many the fish <[email protected]>
  • Loading branch information
3 people authored Nov 27, 2024
2 parents 467b3e4 + 1d1d21b commit 344d180
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions charabia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ german-segmentation = []

[dev-dependencies]
criterion = "0.5"
jemallocator = "0.5.4"
quickcheck = "1"
quickcheck_macros = "1"

mimalloc = "0.1.43"

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

#[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 344d180

Please sign in to comment.