au icon indicating copy to clipboard operation
au copied to clipboard

Improve efficiency of explicit-rep overflow checkers

Open chiphogg opened this issue 1 year ago • 0 comments

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 avatar Dec 09 '24 15:12 chiphogg