Merge 'Fix performance regression in prepare' from Piotr Rżysko

Attempt at fixing https://github.com/tursodatabase/turso/issues/2527.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #2532
This commit is contained in:
Pekka Enberg
2025-08-11 15:08:10 +03:00
committed by GitHub
3 changed files with 6 additions and 0 deletions

1
Cargo.lock generated
View File

@@ -4233,6 +4233,7 @@ dependencies = [
"lru",
"memory-stats",
"miette",
"mimalloc",
"pack1",
"parking_lot",
"paste",

View File

@@ -98,6 +98,7 @@ env_logger = "0.11.6"
test-log = { version = "0.2.17", features = ["trace"] }
lru = "0.14.0"
sorted-vec = "0.8.6"
mimalloc = { version = "0.1.46", default-features = false }
[[bench]]
name = "benchmark"

View File

@@ -3,6 +3,10 @@ use pprof::criterion::{Output, PProfProfiler};
use std::{sync::Arc, time::Instant};
use turso_core::{Database, PlatformIO};
#[cfg(not(target_family = "wasm"))]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
fn rusqlite_open() -> rusqlite::Connection {
let sqlite_conn = rusqlite::Connection::open("../testing/testing.db").unwrap();
sqlite_conn