If you really want to experience pure sh**, try GRAILS. that is the ultimate nightmare..
- c++ Extensions are possible -> Speedup for certain situations
- From http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js
"In one sentence: Node.js shines in real-time web applications employing push Technology"
So These are my 2 Cents..
I've heard people mention Grails when I criticized Rails. I never understood the point of languages built on the JVM, languages that compile to Java bytecode but aren't Java.
I modified the java code and did some minor optimization:
Fixed the bug
Re-use Random generator instead of creating a new one every time.
Wait till end of processing to output to console (I assume the goal is to measure processing time not measure the time to output to console).
I did not verify the validity of the code outside from the reported bug.
Running the main() method on a JDK 7 build 51 inside my eclipse on a core I7 quad core HT I got 0.255 secs.
Ran it 10 times on command line using same machine and same JDK.
Results are here
Did you run the other versions on your PC for a valid comparison?
I.e., if the Java version is faster on your PC, I need to know if it's because you have a faster PC or if the code is optimized better.
Also, when I timed my versions, I included all the time (including writing to console). However, writing to console is only milliseconds.