Skip to content

Commit

Permalink
perf(cli): use mimalloc as global allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardosm committed Oct 31, 2024
1 parent 04b3adf commit 2d74ae4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions rsjsonnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ harness = false

[dependencies]
clap = { version = "4.5.20", features = ["derive"] }
mimalloc = "0.1.43"
rsjsonnet-front = { workspace = true, features = ["crossterm"] }
rsjsonnet-lang = { workspace = true }

Expand Down
3 changes: 3 additions & 0 deletions rsjsonnet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ use rsjsonnet_lang::program::{Program, Thunk, Value};

mod cli;

#[global_allocator]
static GLOBAL_ALLOCATOR: mimalloc::MiMalloc = mimalloc::MiMalloc;

fn main() -> ExitCode {
match main_inner() {
Ok(()) => ExitCode::SUCCESS,
Expand Down

0 comments on commit 2d74ae4

Please sign in to comment.