1. The flags used are in their own Makefiles. Also, these days, it really is not very sensitive. Most decent compilers have very little variation in performance when twiddling with detailed optimization flags.
2. The later Intel chips are enormously more important to anyone alive, and are more representative of real figures that will be observed, anyway.
3. It still seems extremely notable that the Java versions - both simple and optimized - outperformed the C++ version.
The last point is critical. It turns the whole article on its head. Instead of supporting all of the "of course, this is obvious" comments, it makes this a notable result. Even with very poor programming, the Java version outperforms the tuned C++ version on modern hardware.
(And, definitely, the Java version was not written by a Java expert. It spews heap like crazy, uses Integer wrapped objects, uses generics where specialized primitive collections really need to be used, uses a custom set implementation that linearly scans the list on every insert, uses LinkedList where an ArrayDequeue or similar should be used, etc.)
Any test like this wouldn't even be noted anywhere if it wasn't from Google, of course. It would be nice to have available the context which makes the results so radically different from anything realistic. (The only information we get is the "Pentium IV" bit, and a Java flag that does not actually exist.) I suspect that in addition to being run on antique hardware, it was also run with a JVM from 8 years ago.
Re:Its all about the command line stupid....
on
Ubuntu on a Dime
·
· Score: 1
I wouldn't say "fine"... Maybe "sometimes adequate". Try "2^49 + 1 - 2^49". Google calls that "0". At least Bing gets that right. (And doesn't break until 2^63). Wolfram Alpha gets it to almost any value. Which means Bing will, if forced.
Both will even get "2^x + 1 - 2^x". Oh, and hey, they will do graphing and algebra. And solve equations.
I do expect to be able to rely on at least 64-bit numbers. I expect a lot more, really - this is simple and old stuff. Google is just weak and deficient here.
Sure - but there are a few things to note.
1. The flags used are in their own Makefiles. Also, these days, it really is not very sensitive. Most decent compilers have very little variation in performance when twiddling with detailed optimization flags.
2. The later Intel chips are enormously more important to anyone alive, and are more representative of real figures that will be observed, anyway.
3. It still seems extremely notable that the Java versions - both simple and optimized - outperformed the C++ version.
The last point is critical. It turns the whole article on its head. Instead of supporting all of the "of course, this is obvious" comments, it makes this a notable result. Even with very poor programming, the Java version outperforms the tuned C++ version on modern hardware.
(And, definitely, the Java version was not written by a Java expert. It spews heap like crazy, uses Integer wrapped objects, uses generics where specialized primitive collections really need to be used, uses a custom set implementation that linearly scans the list on every insert, uses LinkedList where an ArrayDequeue or similar should be used, etc.)
Any test like this wouldn't even be noted anywhere if it wasn't from Google, of course. It would be nice to have available the context which makes the results so radically different from anything realistic. (The only information we get is the "Pentium IV" bit, and a Java flag that does not actually exist.) I suspect that in addition to being run on antique hardware, it was also run with a JVM from 8 years ago.
I wouldn't say "fine"... Maybe "sometimes adequate". Try "2^49 + 1 - 2^49". Google calls that "0". At least Bing gets that right. (And doesn't break until 2^63). Wolfram Alpha gets it to almost any value. Which means Bing will, if forced. Both will even get "2^x + 1 - 2^x". Oh, and hey, they will do graphing and algebra. And solve equations. I do expect to be able to rely on at least 64-bit numbers. I expect a lot more, really - this is simple and old stuff. Google is just weak and deficient here.