5 ms·
I guess this is the reason why Scala gets a lot of attention: same speed as Java (on JVM), fully compatible with Java, it has static typing, and it's produc
by CCs 16y ago
I guess this is the reason why Scala gets a lot of attention:
same speed as Java (on JVM),
fully compatible with Java,
it has static typing,
and it's productive like RoR or Python.
BTW, both the Java (javac) and Scala compilers were written by the same person.
- sigzero 16y agoI have not read where Scala is the same speed, citation?
- whakojacko 16y agoits not real "proof", but check out the Computer Language Benchmarks Game: http://shootout.alioth.debian.org/ http://shootout.alioth.debian.org/
- igouy 16y agoSo if that isn't 'real "proof"' what would be 'real "proof"' ?
- alnayyir 16y agoImplementation + problem specific. Languages aren't fast, code + data + implementation combinations are.
- igouy 16y agoYou seem to have encrypted your comment - please decrypt so we can understand and evaluate the point you wish to make.
- CCs 16y agoThe language and its implementation will limit the efficiency of the end-result (the running code). The current Google Go compiler implementation produces slow code, but there's a potential to make it as fast as C. The JavaScript implementation can be made better, but it will never be close to C. Scala running on JVM will produce similar efficiency to Java. On multicore the Scala compiler will likely produce a faster code by default, but that advantage can be matched in Java with extra work. Scala running on .NET will likely perform similar to C#. Now it's up to the developer to create efficient source code for the given language. It is possible to write slower code in C than in JavaScript, but the focus should be on "normally". Normally Scala gives you the same end-result with less work than Java. There are exceptions. More: http://www.scala-lang.org/node/25 http://www.scala-lang.org/node/25 (Look for "Scala Compiler Performance") An older measurement: http://fupeg.blogspot.com/2008/06/scala-vs-java-performance.html http://fupeg.blogspot.com/2008/06/scala-vs-java-performance....
- brl 16y agoScala is as fast as Java because similar code in both languages compile to the exact same bytecode. With type specialization in Scala 2.8 it will be even faster than Java in some cases.