3 ms·
With const generics ranged integers would be implemented as a user specified check. How viable would it be to implement an optimization step which seeks to min
by henrikeh 8y ago
With const generics ranged integers would be implemented as a user specified check.
How viable would it be to implement an optimization step which seeks to minimize the number of these checks?
- steveklabnik 8y agoI'm not entirely sure what you mean, exactly. As far as I know, all of the usual optimization passes would already be working to minimize them.
- sanxiyn 8y agoRust could emit LLVM range metadata for ranged integers. IIRC, it already does so for enum discriminants.
- steveklabnik 8y agoThat seems quite good!