Skip to content

Commit

Permalink
use mimalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
nanakura committed Jan 20, 2025
1 parent 2f67533 commit f249189
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 31 deletions.
48 changes: 20 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ clap = { version = "4.4", features = ["derive", "cargo"] }
clap-verbosity-flag = "2.1.1"
which = "6.0.1"
simd-json = "0.14.3"
snmalloc-rs = { version = "0.3.7", features = ["native-cpu"] }
mimalloc = "0.1.43"

[[example]]
name = "native-json-parser"
Expand Down
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ use clap::Parser;
use emacs_lsp_booster::app;
use emacs_lsp_booster::bytecode;

#[global_allocator]
static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
use mimalloc::MiMalloc;

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

#[derive(Parser)]
#[command(long_about = None, about = None,
Expand Down

0 comments on commit f249189

Please sign in to comment.