Skip to content

Commit 6114ae0

Browse files
committed
perf: improve the performance of time functions by parsing them using hard code
1 parent a6ac9a5 commit 6114ae0

File tree

3 files changed

+533
-511
lines changed

3 files changed

+533
-511
lines changed

ā€Žsrc/query/ast/benches/bench.rsā€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ fn main() {
1818

1919
// bench fastest │ slowest │ median │ mean │ samples │ iters
2020
// ╰─ dummy │ │ │ │ │
21-
// ā”œā”€ deep_function_call 802.2 µs │ 1.207 ms │ 842 µs │ 850.6 µs │ 100 │ 100
22-
// ā”œā”€ deep_query 242.3 µs │ 426.3 µs │ 254.2 µs │ 257.3 µs │ 100 │ 100
23-
// ā”œā”€ large_query 1.104 ms │ 1.264 ms │ 1.14 ms │ 1.142 ms │ 100 │ 100
24-
// ā”œā”€ large_statement 1.097 ms │ 1.2 ms │ 1.15 ms │ 1.148 ms │ 100 │ 100
25-
// ╰─ wide_expr 282.4 µs │ 368.6 µs │ 298 µs │ 298.7 µs │ 100 │ 100
21+
// ā”œā”€ deep_function_call 580 µs │ 1.127 ms │ 617.4 µs │ 624.9 µs │ 100 │ 100
22+
// ā”œā”€ deep_query 228.6 µs │ 416 µs │ 245.6 µs │ 248.5 µs │ 100 │ 100
23+
// ā”œā”€ large_query 804.4 µs │ 916.8 µs │ 843.7 µs │ 845.2 µs │ 100 │ 100
24+
// ā”œā”€ large_statement 815.3 µs │ 902.3 µs │ 849.8 µs │ 851.9 µs │ 100 │ 100
25+
// ╰─ wide_expr 192.2 µs │ 273.7 µs │ 208.2 µs │ 208.6 µs │ 100 │ 100
2626

2727
#[divan::bench_group(max_time = 0.5)]
2828
mod dummy {

0 commit comments

Comments
Ā (0)