Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I agree that this is a good example and there are probably similar cases in video processing and in graphics rendering.

However not all CPUs stall for subnormal data and if the CPU designers would have ensured that none of them stall, no such discussions would have been ever needed.

Outside such special cases like real-time DSP and graphics, using flush-to-zero or options like -Ofast or -ffast-math are seldom justified and they can be dangerous, especially when they are used without a prior analysis and tests to determine whether exception conditions really appear when the program is run, and why.



> However not all CPUs stall for subnormal data and if the CPU designers would have ensured that none of them stall, no such discussions would have been ever needed.

I don't really disagree (I've pushed hard for no subnormal stalls for years), but there are some timing and area tradeoffs that come with this that make it a somewhat hard sell for FPUs that aren't built entirely around FMA (there are tradeoffs even for designs that are purely FMA based, but they're a lot smaller).

Mainstream x86 designs _still_ have some subnormal stalls!


> Outside such special cases like real-time DSP and graphics

Personally I see audio and graphics as the common case, and scientific computing as the special case ;) Do game physics engines expect denormals to be preserved?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: