digitalmars.D - Integer ops tests in Clang
- bearophile (5/7) Apr 08 2011 In real programs in Delphi I used to see about 10-15% slowdown caused by...
- Walter Bright (2/7) Apr 08 2011 Thanks for the link. This is a nice idea.
Through Reddit I've just found something nice, "Finding Integer Undefined Behaviors in C/C++": http://embed.cs.utah.edu/ubc/We modified Clang to dynamically detect most of C/C++'s integer undefined behaviors. Using it, we have found undefined behaviors in nearly every piece of open source software that we have checked.<Slowdown due to checking is highly variable, but is in the 0%-30% range for most codes. A few math-intensive codes (codecs, crypto) slow down by more than 100%. It seems likely that by tuning LLVM and our patch a bit, these overheads could be substantially reduced.<In real programs in Delphi I used to see about 10-15% slowdown caused by such runtime tests. This is not that different from the slowdown caused by array bound tests. And you are able to disable them globally or in a part of the code. Bye, bearophile
Apr 08 2011
On 4/8/2011 5:39 PM, bearophile wrote:Through Reddit I've just found something nice, "Finding Integer Undefined Behaviors in C/C++": http://embed.cs.utah.edu/ubc/Thanks for the link. This is a nice idea.We modified Clang to dynamically detect most of C/C++'s integer undefined behaviors. Using it, we have found undefined behaviors in nearly every piece of open source software that we have checked.<
Apr 08 2011