mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 20:14:21 +01:00
core: Switch SQLite to use locking_mode EXCLUSIVE
Let's switch the SQLite benchmarks to use similar file locking protocol
as we do. Improves SQLite's performance by 2x, but Limbo is still
faster.
Before:
rusqlite/Prepare statement: 'SELECT * FROM users LIMIT 1'
time: [2.1027 µs 2.1239 µs 2.1563 µs]
thrpt: [463.75 Kelem/s 470.83 Kelem/s 475.57 Kelem/s]
After:
rusqlite/Execute prepared statement: 'SELECT * FROM users LIMIT 1'
time: [940.07 ns 944.16 ns 949.39 ns]
thrpt: [1.0533 Melem/s 1.0591 Melem/s 1.0638 Melem/s]
This commit is contained in:
@@ -107,6 +107,8 @@ fn rusqlite_bench(criterion: &mut Criterion) {
|
||||
|
||||
let conn = rusqlite::Connection::open("../testing/testing.db").unwrap();
|
||||
|
||||
conn.pragma_update(None, "locking_mode", &"EXCLUSIVE")
|
||||
.unwrap();
|
||||
group.bench_function("Prepare statement: 'SELECT 1'", |b| {
|
||||
b.iter(|| {
|
||||
conn.prepare("SELECT 1").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user