mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
Use mimalloc for benchmarks (#7029)
`mimalloc` is a _much_ faster allocator, especially important when doing a lot of small allocations (which egui does). We use `mimalloc` in Rerun, and I recommend everyone to use it. ## The difference it makes 
This commit is contained in:
@@ -5,6 +5,9 @@ use epaint::{
|
||||
TessellationOptions, Tessellator, TextureAtlas, Vec2,
|
||||
};
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; // Much faster allocator
|
||||
|
||||
fn single_dashed_lines(c: &mut Criterion) {
|
||||
c.bench_function("single_dashed_lines", move |b| {
|
||||
b.iter(|| {
|
||||
|
||||
Reference in New Issue
Block a user