3 ms·
.saturating_add() exists. You can create a wrapper type around this and implement the Add/Sub/Mul traits.
by Manishearth 11y ago
.saturating_add() exists. You can create a wrapper type around this and implement the Add/Sub/Mul traits.
- vardump 11y agoDoes it have branchless codegen?
- Manishearth 11y agoNot right now (I'm surprised that's the case, there should be intrinsics for it), but that could change.
- dbaupp 11y agoIt gets optimised to be branchless if LLVM thinks that will be faster, yes.