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

Fix high cost overflowing #140

Closed
wants to merge 1 commit into from

Conversation

saulshanabrook
Copy link
Member

@saulshanabrook saulshanabrook commented May 2, 2023

This PR reduces the size of the HIGH_COST so that it won't overflow when added to other costs.

Instead of using all the bits, it will only use half of them, which should still give it a pretty high cost but also plenty of room to grow.

@yihozhang
Copy link
Collaborator

Would it be nice to make cost have type Option<usize> to avoid magic number costs for unwanted constructors for extraction? I'm happy to make a PR.

@saulshanabrook
Copy link
Member Author

@yihozhang That makes sense to me. Would these unwanted constructors then never be extracted?

saulshanabrook added a commit to egraphs-good/egglog-python that referenced this pull request May 2, 2023
@yihozhang
Copy link
Collaborator

Yes that's what I'm thinking

@saulshanabrook
Copy link
Member Author

@yihozhang That sounds better to me than this PR, so that these temporary variables are never returned.

@mwillsey
Copy link
Member

mwillsey commented May 2, 2023

Ok, closing this for now in favor of that future PR.

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.

None yet

3 participants