3 ms·
Some random adjacent thoughts: * both arithmetic bounds and bitwise bounds are useful for things the other can't do * you have to trade off "how much useful i
by o11c 3y ago
Some random adjacent thoughts:
* both arithmetic bounds and bitwise bounds are useful for things the other can't do
* you have to trade off "how much useful information am I keeping for optimizations" with "how much memory am I willing to spend on that information"
* if you had infinite memory you could just track the value sets directly.
* if the value set is union-like, even if it just contains a single special value (often -1, but also MAX_INT and others), that often completely ruins the ability to track meaningful arithmetic or bitwise bounds.
* if an enum is involved, often that's a place that already stores the full value set (but beware the numerous variations of what an "enum" is)