4 ms·
I think what pizlonator meant is that some languages like C have pervasive undefined behavior. (For instance, INT_MAX + 1 is allowed to erase your hard drive.)
by marvy 10y ago
I think what pizlonator meant is that some languages like C have pervasive undefined behavior. (For instance, INT_MAX + 1 is allowed to erase your hard drive.) The claim is that this allows compiler optimizations that would otherwise not be possible. The question is: how bad would that be? Let's turn off all these optimizations and see how much the benchmark scores drop. If everything is twice as slow, then maybe this undefined stuff is worth it. If everything is one percent slower, then maybe it's not.
- DrJokepu 10y agoI think the performance implications of bounds checking are fairly well studied.
- nickpsecurity 10y agoThat part of the field is still in exploration phase. The reason is that you can mix run-time checks with no checks for performance enhancement. Static analysis and other schemes are used to prove specific code doesn't need checks. The rest get checks automatically. Performance varies per scheme applied with overhead going down significantly over past decade. We don't yet know the answer on just how much spatial or temporal safety we can get at what cost.