optional mimalloc dep for 30% speed up

This commit is contained in:
2026-07-01 10:51:36 +02:00
parent 131db6a453
commit 3a4a499cf6
3 changed files with 53 additions and 0 deletions

View File

@@ -12,6 +12,10 @@ use std::{
use tokenizer::ZernError;
#[cfg(feature = "mimalloc")]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
fn compile_file(args: Args) -> Result<(), ZernError> {
let source = match fs::read_to_string(&args.path) {
Ok(x) => x,