Skip to content

Commit b52dc0c

Browse files
committed
chore: switch allocator to mimalloc for ~20% perf in some cases
1 parent 600d788 commit b52dc0c

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

Cargo.lock

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ derive_more = { version = "=2.1.1", features = ["debug", "eq"] }
7575
portable-pty = "=0.9.0"
7676
tui-term = "=0.3.1"
7777
kanal = "=0.1.1"
78+
mimalloc = { version = "0.1.48", features = ["v3"] }
7879

7980
[features]
8081
default = ["cli"]

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#[macro_use]
2727
extern crate log;
2828

29+
#[global_allocator]
30+
static GLOBAL_ALLOCATOR: mimalloc::MiMalloc = mimalloc::MiMalloc;
31+
2932
use std::any::Any;
3033
use std::borrow::Cow;
3134
use std::fmt::Display;

0 commit comments

Comments
 (0)