Merge 'remove turso_sqlite3_parser from turso_parser' from Lâm Hoàng Phúc

Closes #2888
This commit is contained in:
Pekka Enberg
2025-09-02 14:20:39 +03:00
committed by GitHub
3 changed files with 0 additions and 31 deletions

1
Cargo.lock generated
View File

@@ -4347,7 +4347,6 @@ dependencies = [
"strum",
"strum_macros",
"thiserror 1.0.69",
"turso_sqlite3_parser",
]
[[package]]

View File

@@ -25,7 +25,6 @@ thiserror = "1.0.61"
[dev-dependencies]
fallible-iterator = "0.3"
criterion = { version = "0.5", features = ["html_reports" ] }
turso_sqlite3_parser = { workspace = true }
[target.'cfg(not(target_family = "windows"))'.dev-dependencies]
pprof = { version = "0.14.0", features = ["criterion", "flamegraph"] }

View File

@@ -1,11 +1,6 @@
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
use fallible_iterator::FallibleIterator;
use pprof::criterion::{Output, PProfProfiler};
use turso_parser::{lexer::Lexer, parser::Parser};
use turso_sqlite3_parser::lexer::{
sql::{Parser as OldParser, Tokenizer},
Scanner,
};
fn bench_parser(criterion: &mut Criterion) {
let queries = [
@@ -22,12 +17,6 @@ fn bench_parser(criterion: &mut Criterion) {
b.iter(|| Parser::new(black_box(qb)).next().unwrap());
});
group.bench_function(BenchmarkId::new("limbo_old_parser_query", ""), |b| {
b.iter(|| {
OldParser::new(black_box(qb)).next().unwrap().unwrap();
});
});
group.finish();
}
}
@@ -49,12 +38,6 @@ fn bench_parser_insert_batch(criterion: &mut Criterion) {
b.iter(|| Parser::new(black_box(qb)).next().unwrap());
});
group.bench_function(BenchmarkId::new("limbo_old_parser_insert_batch", ""), |b| {
b.iter(|| {
OldParser::new(black_box(qb)).next().unwrap().unwrap();
});
});
group.finish();
}
}
@@ -78,18 +61,6 @@ fn bench_lexer(criterion: &mut Criterion) {
});
});
group.bench_function(BenchmarkId::new("limbo_old_lexer_query", ""), |b| {
b.iter(|| {
let tokenizer = Tokenizer::new();
let mut scanner = Scanner::new(black_box(tokenizer));
loop {
if let (_, None, _) = scanner.scan(black_box(qb)).unwrap() {
break;
}
}
});
});
group.finish();
}
}