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

BestFirstSearch: relax cost check w/ optimal token #4854

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kitbellew
Copy link
Collaborator

Rather than requiring that state cost remain unchanged with the latest split, let's limit it to checking that the original cost of the split (before any penalties may have been applied) is zero, and that the state does not overflow.

This leads to extremely rare formatting changes (none on scala, spark, scalafmt, scalameta repos) and on average over a 5% improvement in the BestFirstSearch algorithm efficiency.

This approach protects optimal-token intentions from penalties which are designed to rank different states, and is a follow-on to #4851.

Rather than requiring that state cost remain unchanged with the latest
split, let's limit it to checking that the original cost of the split
(before any penalties may have been applied) is zero, and that the
state does not overflow.

This leads to extremely rare formatting changes (none on scala, spark,
scalafmt, scalameta repos) and on average over a 5% improvement in the
BestFirstSearch algorithm efficiency.

This approach protects optimal-token intentions from penalties which
are designed to rank different states, and is a follow-on to scalameta#4851.
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.

1 participant