I resolved a simple problem with several different languages but with same algorithm, the execution time and memory usage is a surprise to me.
0.76 1399M JAVA
0.11 7.3M RUBY
0.00 2.6M C++ 4.3.2
2.32 373.1M SCALA
Why JAVA and SCALA use so much memory?
I think JAVA and SCALA should be faster than RUBY?
Also, I found the language time multiplier at Announcing Variable Time Limits Based on Programming Language
Why time multiplier for Scala is 1X, but Java is 2X, since Scala is a JVM based language it should as fast as Java in most cases.