3 ms·
Yes, this is a consistent position, but bounds checking all indexing and making pointers larger by including length will cause slowdown much larger than 1-2%. M
by sanxiyn 5y ago
Yes, this is a consistent position, but bounds checking all indexing and making pointers larger by including length will cause slowdown much larger than 1-2%. My estimate is at least 10% slowdown. So citing 1-2% slowdown is misleading.
- ghoward 5y agoI agree 1-2% might be misleading, but Dr. John Regehr puts overflow checking overhead at 5%. [1] I'll take 5% or even 10% for correctness because, again, fast and wrong is very bad. [1]: https://blog.regehr.org/archives/1154 https://blog.regehr.org/archives/1154
- Joky 5y agoYou may be interested by https://www.microsoft.com/en-us/research/project/checked-c/ https://www.microsoft.com/en-us/research/project/checked-c/