3 ms·
The compiler is allowed to act as if this loop executes exactly 16 times. That means it could unroll and vectorize it for example.
by BruiseLee 5y ago
The compiler is allowed to act as if this loop executes exactly 16 times. That means it could unroll and vectorize it for example.
- vyodaiken 5y agoIt is completely useless to allow compilers to assume false things about the code they generate.
- fooker 5y agoIt’s not useless. The assumption is not false if the program doesn’t have undefined behavior. The assumption allows the code to be a few times faster. To disallow this assumption would inhibit these optimizations.