Skip to content

Commit

Permalink
Switch to jemalloc (for 33% better performance)
Browse files Browse the repository at this point in the history
  • Loading branch information
elimirks committed Dec 19, 2021
1 parent f454623 commit 7e0c0bf
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
42 changes: 42 additions & 0 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
[dependencies]
jemallocator = "0.3.2"
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ struct Opts {
inputs: Vec<String>,
}

// jemalloc performs a lot better in multithreaded applications
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

fn main() {
let opts = parse_opts();

Expand Down

0 comments on commit 7e0c0bf

Please sign in to comment.