[std-interval] Interval comparison operators
Alan Eliasen
eliasen at mindspring.com
Wed May 31 21:41:41 PDT 2006
George Corliss wrote:
> Does anyone have hard experimental data on the performance costs of NaN?
Here's some additional data on a different operating system,
processor, and compiler version. This makes a huge difference!
Processor: Pentium III
Windows 2000
g++ (GCC) 3.4.2 (mingw-special)
-O0:
add1: 10455 ticks Sum: 1e+009
addQNaN: 166990 ticks Sum: 1.#QNAN
addSNaN: 167741 ticks Sum: 1.#QNAN
-O1:
add1: 10344 ticks Sum: 1e+009
addQNaN: 158759 ticks Sum: 1.#QNAN
addSNaN: 159970 ticks Sum: 1.#QNAN
-O2:
add1: 10334 ticks Sum: 1e+009
addQNaN: 163325 ticks Sum: 1.#QNAN
addSNaN: 163405 ticks Sum: 1.#QNAN
-O3:
add1: 10344 ticks Sum: 1e+009
addQNaN: 163496 ticks Sum: 1.#QNAN
addSNaN: 163515 ticks Sum: 1.#QNAN
It looks like the cost of doing operations with NaN on this older
architecture is quite high! I should reiterate that you almost never
actually want to *do* operations with NaN, (you usually just want to
test with isnan() ) but on this platform, it's about 16 times slower!
As before, sample program is here:
http://futureboy.us/temp/NaN.cc
--
Alan Eliasen | "When trouble is solved before it
eliasen at mindspring.com | forms, who calls that clever?"
http://futureboy.us/ | --Sun Tzu
More information about the Std-interval
mailing list