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

Simplify some term search tactics #17478

Merged
merged 6 commits into from
Jun 24, 2024
Merged

Simplify some term search tactics #17478

merged 6 commits into from
Jun 24, 2024

Conversation

kilpkonn
Copy link
Contributor

Working on the paper @phijor found that "Data constructor" tactic could be simplified quite a bit by running it only in the backwards direction. With n+1 rounds it has same coverage as previous implementation in n rounds, however the tactic it self is more simple and also potentially faster as there is less to do.

In a nutshell the idea is to only work with types in the wish-list rather than with any types.

Turns out it is quite a bit faster:

Before:

ripgrep:
Tail Expr syntactic hits: 238/1692 (14%)
Tail Exprs found: 1223/1692 (72%)
Term search avg time: 15ms

nalgebra:
Tail Expr syntactic hits: 125/3001 (4%)
Tail Exprs found: 2143/3001 (71%)
Term search avg time: 849ms

After

ripgrep:
Tail Expr syntactic hits: 246/1692 (14%)
Tail Exprs found: 1209/1692 (71%)
Term search avg time: 8ms

nalgebra:
Tail Expr syntactic hits: 125/3001 (4%)
Tail Exprs found: 2028/3001 (67%)
Term search avg time: 305ms

Also removed niche optimization of removing scope defs from the search space as this wasn't helping much anyway and made code a bit more complex.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 22, 2024
@kilpkonn kilpkonn force-pushed the master branch 2 times, most recently from 2910617 to 51c3bd2 Compare June 22, 2024 18:33
@Veykril
Copy link
Member

Veykril commented Jun 24, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 24, 2024

📌 Commit 51c3bd2 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jun 24, 2024

⌛ Testing commit 51c3bd2 with merge db69df3...

@bors
Copy link
Collaborator

bors commented Jun 24, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing db69df3 to master...

@bors bors merged commit db69df3 into rust-lang:master Jun 24, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants