News for hackers. Stuff that matters.
Re:Why floats suck - accurate galaxy-wide coordinates in 128... by palish on Tuesday May 03, 2011 @06:06PM (#2511835)
I've been bitten by not having asserts (and, conversely, saved by having them) that I don't hold to the philosophy of "don't use asserts out of performance considerations".

  assert( len != 0.0f );
If that alone is enough to slow down your program by any significant margin, then you're doing something wrong.

That said, I've experienced your standpoint --- A debug mode which was unusably slow. However, that results from programmers who rely too much on the optimizer. STL, for example, can perform very slowly in debug mode in certain circumstances.

Re:Why floats suck - accurate galaxy-wide coordinates in 128... by barrettcolin on Tuesday May 03, 2011 @06:17PM (#2511864)
It was recollection on my part; not backed by empirical evidence. For this exact case, though: wouldn't you better handle this with floating point exceptions?