News for hackers. Stuff that matters.
Re:Current hardware trends make C++ exceptions harder to jus... by ncmncm on Wednesday February 23, 2022 @02:45PM (#30445413)
Yes. The article author's mistake was actually throwing those exceptions too often. For arithmetic errors, NaN is usually the better choice.
Re:Current hardware trends make C++ exceptions harder to jus... by kllrnohj on Wednesday February 23, 2022 @04:01PM (#30446388)
It's an exploration in scaling, how could that possibly have been a "mistake"? The paper isn't advocating for throwing an exception instead of returning NaN in the specific case of calculating a square root. It's instead only exploring the overhead & scaling of various error handling types.