Skip to content

Commit

Permalink
utils: njobs helper - remove logging in perf-critical code; use itoa …
Browse files Browse the repository at this point in the history
…instead of to_string
  • Loading branch information
jqnatividad committed Oct 19, 2024
1 parent 4579c1b commit 00e3493
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ pub fn njobs(flag_jobs: Option<usize>) -> usize {
jobs
}
});
env::set_var("RAYON_NUM_THREADS", jobs_to_use.to_string());
log::info!("Using {jobs_to_use} jobs...");
env::set_var("RAYON_NUM_THREADS", itoa::Buffer::new().format(jobs_to_use));
// log::info!("Using {jobs_to_use} jobs...");
jobs_to_use
}

Expand Down

0 comments on commit 00e3493

Please sign in to comment.