3 ms·
is the plan for koltin to replace java in the development of jetbrains products if yes, then i would assume the primary objective should be performance .. but
by systems 11y ago
is the plan for koltin to replace java in the development of jetbrains products
if yes, then i would assume the primary objective should be performance .. but this doesnt seem to be the case
and my question is, is there any jvm language which is faster than java
- deleted 11y ago[deleted]
- lmm 11y agoAll JVM languages "are" the same speed, because they compile to the same bytecode. OTOH some languages make it more practical / cheaper to write higher-performance code, e.g. in Scala you can use @specialized to automatically generate unboxed special cases for generic code that you'd have to write (and keep track of) by hand in Java. But if you ask "in which JVM language is it most practical/cheapest to write feature X with performance Y?" then the biggest component of the answer is going to be how easy programming in general in that language is, not anything specific to performance. The question "how fast will a naive implementation in language X perform?" does have an answer, but it's not a question you should ever be asking - if a naive implementation in language X is faster than a naive implementation in language Y, but takes 3x as long to write as an optimised implementation in language Y that's faster than the naive implementation in language X, then language Y is the better choice.
- gregschlom 11y agoThey compile to the same bytecode, but some languages may have features that compile to a lot more bytecode than others. A dynamic language such as Clojure, for example, is definitely slower than Java, although they are both JVM-based, because it has to do a lot more.
- mike_hearn 11y agoKotlin relies quite heavily on bytecode level method inlining, for instance. The advantage is that it makes code written in a functional style effectively free (well, almost, unless you could gain performance from step fusion). The disadvantage is that the JVM wasn't designed for that and it messes up stack traces.
- cwbrandsma 11y agoI questioning if that is the fault of the language, the jvm, or the developer at this point.
- xaduha 11y agoWhat fault are we talking about?
- cel1ne 11y agoKotlin should be equally fast and in some parts faster (function inlineing, lambda expressions). Check out the generated bytecode, it's in the docs.
- xaduha 11y agoI'd be satisfied with it not being noticeably slower than Java and according to some it isn't. Do you speak from experience or just assume that it must be slower?
- yole 11y agoYes, the plan is for Kotlin to replace Java at JetBrains. I don't see how the performance requirement follows from that. The performance of JetBrains products is determined far more by the implementation algorithms than by the compiler used to build their source code. Kotlin's performance is on par with Java, and that is all that JetBrains needs for its internal use.