Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement new node matcher API #370

Merged
merged 12 commits into from
Jun 30, 2024
Merged

Conversation

gvozdvmozgu
Copy link
Collaborator

No description provided.

Copy link

Benchmark for e7601f5

Click to view benchmark
Test Base PR %
DepthMap::from_parent 210.5±3.29µs 210.6±4.66µs +0.05%
fix_complex_query 21.6±0.09ms 21.4±0.08ms -0.93%
parse_complex_query 269.5±3.64µs 8.1±0.19µs -96.99%
parse_expression_recursion 293.8±5.65µs 24.5±0.18µs -91.66%
parse_simple_query 254.9±8.80µs 2.3±0.03µs -99.10%

@gvozdvmozgu gvozdvmozgu force-pushed the refactor/parsing-infrastructure branch from 0d59a98 to dc4099c Compare June 16, 2024 13:52
Copy link

Benchmark for 0377493

Click to view benchmark
Test Base PR %
DepthMap::from_parent 213.1±4.21µs 211.5±3.54µs -0.75%
fix_complex_query 21.7±0.13ms 21.4±0.15ms -1.38%
parse_complex_query 270.6±6.10µs 7.9±0.18µs -97.08%
parse_expression_recursion 298.0±10.48µs 23.7±0.22µs -92.05%
parse_simple_query 261.1±5.03µs 2.3±0.09µs -99.12%

Copy link

Benchmark for 297be39

Click to view benchmark
Test Base PR %
DepthMap::from_parent 209.4±2.89µs 218.9±20.34µs +4.54%
fix_complex_query 21.6±0.16ms 20.8±0.07ms -3.70%
parse_complex_query 270.5±6.48µs 7.8±0.05µs -97.12%
parse_expression_recursion 295.8±6.55µs 23.6±0.18µs -92.02%
parse_simple_query 257.6±14.67µs 2.4±0.05µs -99.07%

Copy link

Benchmark for f28743a

Click to view benchmark
Test Base PR %
DepthMap::from_parent 208.9±16.27µs 211.5±2.81µs +1.24%
fix_complex_query 21.8±0.09ms 21.1±0.99ms -3.21%
parse_complex_query 271.1±5.04µs 7.9±0.09µs -97.09%
parse_expression_recursion 298.9±7.54µs 23.8±0.14µs -92.04%
parse_simple_query 259.6±7.16µs 2.3±0.04µs -99.11%

@gvozdvmozgu
Copy link
Collaborator Author

For this, we need a separate counter. We also have a problem where the cache_key is created for each instance, but currently, we don't store the instances; they are created and immediately dropped. This is about grammar, and it is resolved in this pull request.

@gvozdvmozgu
Copy link
Collaborator Author

Oh, I wanted to comment on a different PR

@gvozdvmozgu gvozdvmozgu force-pushed the refactor/parsing-infrastructure branch from 473da2f to 2e440f7 Compare June 28, 2024 10:09
Copy link

Benchmark for f2e3200

Click to view benchmark
Test Base PR %
DepthMap::from_parent 210.0±2.88µs 211.9±2.93µs +0.90%
fix_complex_query 21.6±0.06ms 20.8±0.18ms -3.70%
parse_complex_query 269.7±5.23µs 7.9±0.06µs -97.07%
parse_expression_recursion 300.2±6.52µs 23.8±0.31µs -92.07%
parse_simple_query 258.9±12.00µs 2.3±0.07µs -99.11%

Copy link

Benchmark for 82228dc

Click to view benchmark
Test Base PR %
DepthMap::from_parent 208.0±9.68µs 209.9±1.59µs +0.91%
fix_complex_query 21.7±0.07ms 20.9±0.36ms -3.69%
parse_complex_query 277.7±6.44µs 7.9±0.10µs -97.16%
parse_expression_recursion 302.7±6.19µs 23.9±0.15µs -92.10%
parse_simple_query 268.2±6.40µs 2.3±0.09µs -99.14%

Copy link

Benchmark for 1b18529

Click to view benchmark
Test Base PR %
DepthMap::from_parent 210.0±2.01µs 214.2±3.44µs +2.00%
fix_complex_query 21.7±0.16ms 20.8±0.07ms -4.15%
parse_complex_query 276.8±7.96µs 8.0±0.10µs -97.11%
parse_expression_recursion 298.7±6.54µs 23.8±0.11µs -92.03%
parse_simple_query 260.3±10.52µs 2.3±0.16µs -99.12%

Copy link

Benchmark for e0b404d

Click to view benchmark
Test Base PR %
DepthMap::from_parent 209.5±3.19µs 211.0±2.90µs +0.72%
fix_complex_query 21.6±0.07ms 20.7±0.37ms -4.17%
parse_complex_query 272.6±5.09µs 7.8±0.09µs -97.14%
parse_expression_recursion 291.1±4.34µs 23.8±0.19µs -91.82%
parse_simple_query 255.8±5.48µs 2.5±0.10µs -99.02%

Copy link

Benchmark for d6a8a29

Click to view benchmark
Test Base PR %
DepthMap::from_parent 220.0±6.10µs 216.3±15.37µs -1.68%
fix_complex_query 21.7±0.62ms 20.7±0.41ms -4.61%
parse_complex_query 266.6±4.04µs 7.8±0.08µs -97.07%
parse_expression_recursion 294.4±4.14µs 23.7±0.14µs -91.95%
parse_simple_query 252.6±5.49µs 2.2±0.06µs -99.13%

Copy link

Benchmark for 501fc35

Click to view benchmark
Test Base PR %
DepthMap::from_parent 214.0±8.88µs 211.2±1.65µs -1.31%
fix_complex_query 21.7±0.08ms 20.9±0.98ms -3.69%
parse_complex_query 271.7±5.61µs 8.0±0.05µs -97.06%
parse_expression_recursion 300.3±5.32µs 23.9±1.21µs -92.04%
parse_simple_query 257.8±6.26µs 2.3±0.10µs -99.11%

@gvozdvmozgu gvozdvmozgu marked this pull request as ready for review June 29, 2024 10:56
Copy link

Benchmark for 58d02d7

Click to view benchmark
Test Base PR %
DepthMap::from_parent 208.6±3.74µs 211.3±10.18µs +1.29%
fix_complex_query 21.6±0.09ms 20.5±0.08ms -5.09%
parse_complex_query 273.8±6.97µs 8.0±0.11µs -97.08%
parse_expression_recursion 300.2±4.89µs 23.8±0.22µs -92.07%
parse_simple_query 260.1±9.45µs 2.2±0.04µs -99.15%

@gvozdvmozgu gvozdvmozgu requested a review from benfdking June 29, 2024 14:51
Copy link
Collaborator

@benfdking benfdking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work! I think there's one TODO that we can clean up? If not let me know.

crates/lib/src/core/parser/segments/base.rs Outdated Show resolved Hide resolved
@gvozdvmozgu gvozdvmozgu requested a review from benfdking June 30, 2024 12:13
Copy link

Benchmark for 79124fe

Click to view benchmark
Test Base PR %
DepthMap::from_parent 208.7±5.38µs 210.9±4.06µs +1.05%
fix_complex_query 21.9±0.19ms 20.7±0.31ms -5.48%
parse_complex_query 285.3±7.45µs 7.9±0.07µs -97.23%
parse_expression_recursion 305.6±5.49µs 23.7±0.12µs -92.24%
parse_simple_query 263.3±8.62µs 2.2±0.08µs -99.16%

@benfdking benfdking added this pull request to the merge queue Jun 30, 2024
Merged via the queue into main with commit 8ab9479 Jun 30, 2024
12 checks passed
@benfdking benfdking deleted the refactor/parsing-infrastructure branch June 30, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants