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

Improve efficiency of explicit-rep overflow checkers #349

Open
chiphogg opened this issue Dec 9, 2024 · 0 comments
Open

Improve efficiency of explicit-rep overflow checkers #349

chiphogg opened this issue Dec 9, 2024 · 0 comments
Labels
⬇️ affects: code (implementation) Affects implementation details of the code 📁 kind: cleanup Making the library nicer in some way, without affecting functionality much or at all 💪 effort: medium

Comments

@chiphogg
Copy link
Contributor

chiphogg commented Dec 9, 2024

Our initial implementation for #110 will have separate checks for each of 3 stages: static cast to common type, unit conversion, and static cast to destination type.

Really, there should be a simple boundary between values that won't overflow, and those that will. Therefore, a more efficient version would be to simply compute this boundary, and compare the input value to it.

@chiphogg chiphogg added 📁 kind: cleanup Making the library nicer in some way, without affecting functionality much or at all 💪 effort: medium ⬇️ affects: code (implementation) Affects implementation details of the code labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⬇️ affects: code (implementation) Affects implementation details of the code 📁 kind: cleanup Making the library nicer in some way, without affecting functionality much or at all 💪 effort: medium
Projects
None yet
Development

No branches or pull requests

1 participant