3 ms·
i've seen this multiple times in the past few years, each time i've seen it i've understood just a tiny bit more... i would love to see an interview with the or
by k2xl 14y ago
i've seen this multiple times in the past few years, each time i've seen it i've understood just a tiny bit more... i would love to see an interview with the original author of this...
- andrewcooke 14y agomy impression (from reading the clang/llvm posts a while back) was that they tend to assume that anything with undefined behaviour in the spec returns a value that makes the code faster (eg. by simply ignoring the statement altogether). edit: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html http://blog.llvm.org/2011/05/what-every-c-programmer-should-...
- jtlienwis 14y agoI am wondering if in a lot of code taking this inverse square root is not necessary like when calculating length = sqrt(x^2+y^2) in a lot of code, you just want to know a minimum of maximum value so getting the min or max of x^2+y^2 is what you want and calculating the sqrt is not necessary.