News for hackers. Stuff that matters.
Re:FastDoubleParser: Java port of Daniel Lemires fast_double... by astrange on Monday March 22, 2021 @03:40PM (#26545743)
IME naming projects "fast" or things like that is bad karma. Over time something better comes out and now you're not fast anymore, or there were compromises people have to watch out for to make it fast and now the name is an attractive nuisance.

Swift originally had an option named -Ofast that just turned off all the safety features - eventually it got renamed to -Ounchecked.

Re:FastDoubleParser: Java port of Daniel Lemires fast_double... by ygra on Monday March 22, 2021 @04:28PM (#26546479)
I guess Swift just adopted a similar thing to -ffast-math which some C compilers offer where guarantees about precision of floating-point operations are thrown away to get a similar result faster. Incidentally, that could deserve a better name as well (oh, there seems to be a -funsafe-math-optimizations, which reads a lot closer to what is intended).
Re:FastDoubleParser: Java port of Daniel Lemires fast_double... by cozzyd on Monday March 22, 2021 @10:47PM (#26550431)
Who wouldn't want some fun, safe, math optimizations!

I still don't think it's very descriptive though. Whether or not it's unsafe depends a lot on the domain. In most of my code, I don't care about the sign of zero or floating point associativity and want my compiler to auto convert division to multiplication by reciprocals. Better would be something like -fnon-compliant-float-math or something.

Although I guess -fno-trapping-math is a bit different from the other optimizations which could actually be "unsafe" in a different way, since signaling nans are quite useful for debugging.

Re:FastDoubleParser: Java port of Daniel Lemires fast_double... by j16sdiz on Tuesday March 23, 2021 @01:03AM (#26551316)
In java, method need 'strictfp' modifier to get correct math.
Re:FastDoubleParser: Java port of Daniel Lemires fast_double... by thu2111 on Tuesday March 23, 2021 @06:43AM (#26553384)
That's not been the case for a very long time and even then it wasn't really about 'correctness'. Actually there's a proposal to delete strictfp from the language:

http://openjdk.java.net/jeps/306

Re:FastDoubleParser: Java port of Daniel Lemires fast_double... by sidpatil on Tuesday March 23, 2021 @09:39AM (#26554816)
My favorite example of this is Fast Ethernet—a max speed of 100 Mbps.