News for hackers. Stuff that matters.
Re:How to write efficient matrix multiplication by modeless on Sunday May 27, 2018 @05:27PM (#17169189)
Yes! For some applications including machine learning you can set the option to flush denormals to zero so you don't hit this case.

Infinity and NaN can also be a performance problem but it depends on your processor. Though of course if you get those during matrix multiplication something has probably gone wrong.

Re:How to write efficient matrix multiplication by adrianratnapala on Sunday May 27, 2018 @06:06PM (#17169353)
Depends on what you mean by wrong.

The point of NaNs and infinities is that sometimes it is easier/faster/cleaner to just let those things propagate through the calculation than to do conditional logic that in the end just tends to just simulate the same effect.

True, that consideration is more valid for element-by-element operations rather than things like matrix multiplications. But depending on the operation it might make sense to rely on NaN propagation rather than trying to prescan you matrix for NaNs.