4 ms·
Do we know how much performance gain we experience daily in our OS code/applications/browsing thanks to these kind of optimisations? In other words, what would
by spockz 6y ago
Do we know how much performance gain we experience daily in our OS code/applications/browsing thanks to these kind of optimisations? In other words, what would our daily computer use look like if we stick to not having these kind of optimisations, e.g. all code would use rust instead of c?
- saagarjha 6y agoThis optimization has nothing to do with Rust or C and everything to do with processors and memory.
- spockz 6y agoMaybe 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.