Open penberg opened 1 month ago
This is an issue on the sqlite3_parser. I added a bench just for testing and I got this results,
code
group.bench_function("sqlite3_parser", |b|{
b.iter(|| {
Parser::new("SELECT 1".as_bytes()).next();
});
});
results
limbo/sqlite3_parser
time: [1.2298 µs 1.2320 µs 1.2343 µs]
thrpt: [810.15 Kelem/s 811.72 Kelem/s 813.15 Kelem/s]
Found 5 outliers among 100 measurements (5.00%)
4 (4.00%) high mild
1 (1.00%) high severe
limbo/Prepare statement: 'SELECT 1'
time: [1.4111 µs 1.4178 µs 1.4263 µs]
thrpt: [701.14 Kelem/s 705.29 Kelem/s 708.67 Kelem/s]
change:
time: [-83.042% -82.895% -82.754%] (p = 0.00 < 0.05)
thrpt: [+479.85% +484.62% +489.71%]
Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
3 (3.00%) high mild
6 (6.00%) high severe
So the issue is in this line of code.
So we replace the line with something similar in function and remove the Parser::new dependency?
I assume the Parser::new()
associate function does all of the parsing so replacing that line means replacing the parser.