Performance problem with std.math.abs
bearophile
bearophileHUGS at lycos.com
Tue Jan 29 16:58:40 PST 2013
I have found a performance problem on abs() that I don't
understand:
http://codepad.org/guZyeFOK
In that little program core.stdc.stdlib.abs leads to a much
faster (11 or 12 times faster with DMD on Windows32, compiling
with -O -release -inline -noboundscheck) program compared to
using std.math.abs, despite (as shown in the asm)
core.stdc.stdlib.abs is not inlined.
Do you understand what's going on?
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list