3 ms·
Maybe in this case. But how many cases are there where we do the thing in C that is fast “because we know it is safe” even though it might not be and prevented
by spockz 6y ago
Maybe in this case. But how many cases are there where we do the thing in C that is fast “because we know it is safe” even though it might not be and prevented by a higher level language without direct memory management. The question stands, do we know how much day to day benefit we get from these optimisations through the stack we use daily. What would our daily experience look like if we didn’t apply these optimisations. Would it still be workable?
- saagarjha 6y agoGoing past the end of a buffer is illegal in C, just as it is in many other languages. The correct way to write these is in architecture-specific assembly. Without these kinds of overruns many vectorized algorithms would not be possible, so you'd probably see a noticeable performance decrease.