I'm interested to see they approach they'll take with Go's interfaces. When Go was first being developed we considered targeting the JVM directly, but there seemed to be no efficient way of implementing Go-style interfaces, or "structural typing" (I think Scala uses runtime reflection to achieve this, which is slow).
Why someone would pick Go on the JVM over clojure/scala/jruby/java which are already mature and offer a nice, diverse set features of their own already (persistent data structures, actors, scripting, etc)?
Sharing code between back-end servers running on the Java web stack and resource-constrained devices in the field. Not only for the purpose of running the same code at the same time, but also so you can easily port functionality back and forth between central servers and field devices. It reduces the cost of fixing design mistakes or just evolving your architecture.
I think its somewhat naive to think that it won't be hard to surpass the JVM. The JVM is a highly tuned piece of software especially when it comes to GC i think it will probably take Go a while to surpass the JVM with respect to that, similarly for compilation though it is a little apples to oranges due to the JIT.
First off, I have personally seen, as justincormack describes, compiled Go as it currently exists being roughly comparable to Java, as it currently exists. I haven't burned much time looking around, but I was unable to find what version of Go they were using, or even what compiler for it (there are two major ones, with dramatic performance differences). Furthermore, it is a fact that Go at it's current maturity does little real optimization. Regardless of how "commonplace" languages beating Java may or may not be, Go should stand a very solid chance of doing it, provided it continues to see love.
anyway,
Java also loses handily on startup times, and only wins in runtime speeds against statically typed languages compiling to native code that lack the same tier of backing. Notice that one of the languages that beats Java is C++, possibly the single ugliest language in actual use. Practically a worse case scenario for a language developer but I don't think there has ever been a point in history which it doesn't cream Java. Hobbyist languages, which I would classify most of the languages on that list as (well, the ones that are even commonly compiled to native code in the first place...) will rarely compete with mature enterprise backed languages, but when you weight by funding, compiled languages clean house. Continued development of systems such as LLVM which blur the distinction between the two will only serve to improve the situation.
aside:
I find their Fortran statistic suspect as well. In my professional experience a well designed Fortran program will kick C's ass nearly every time. At least in scientific computing applications anyway.
The fannkuch benchmark is one where Go beats Java, and has a hugely better memory usage. But these benchmarks are highly suspect (they dropped LauJIT recentl despite it being the fastest dynamic language).
C does not have a standard threading library, which is why there is no benchmark.
Here's what you claimed - "but when you weight by funding, compiled languages clean house".
But you don't seem to have any information at all on $$$ amounts spent on the development of compiled languages (C, C++, Fortran, ...) compared to others (Java).
Obviously you don't know what would result "when you weight by funding".
If you want to ask the GCC folk for an estimate of how much of their development has been done while on the payroll of other companies, feel free to do so. I expect you will find that it is somewhere within a few orders of magnitude as what was spent on Java by Sun in the past 2 decades.
In short, my suggestion is that shittons of money has been spent on Java while relatively little money has been spent on Go. Yet somehow they are currently pretty evenhanded. You haven't been able to provide any sources that suggest other than this rather sensible claim.
I don't care about micro benchmarks, I care about real programs. When is the last time any real user said "Yeah I think I'm gonna go home tonight and fire up the N-body problem on the PS3". Write a video game in java and then tell me that it's on par with statically typed languages compiled to native code in terms of performance.
Also, this language shootout doesn't use optimized compilers for a bunch of languages like C#/F#. Also for C/C++, ICC is much faster than gcc. I would hazard a guess that there are many more than 4 language implementations that are much faster than java for real programs that allocate memory.
The fact that Go is on par with java after a couple years is impressive. It took java ~20 years to get to that point.
For C#/F# I'd suggest using the Microsoft compilers/JIT as that's a more realistic usage of C#/F#. I realize that the MSFT implementation doesn't work on Linux.
Languages aren't faster or slower, only implementations are. Look at the performance of the CINT implementation of C.
It's conceivable that on some future computing platform Ruby would be faster than C. (Eg. On a Symbolics LISP machine LISP is probably faster than C)
How is suggesting a C# implementation that you know will not work realistic?
Programmers run their programs with implementations not with languages - so what makes you think programmers are confused about that? When they say C they probably just mean the usual well known C compilers.
Today, we can only use the programming language implementations that are available today.
I am expressing concern that you don't seem to see any issue in the slightest with benchmarking an effectively Microsoft language with Microsofts stack. Good job acting indignant to avoid addressing this.
Allow me to additionally point out that this account you are posting with seems to be used solely for the purpose of trolling discussions about programming languages. Someone who only shows up for programming language discussions surely cannot be any stranger to a very mild "insult" or two.
Go is already faster than Java in half of the benchmarks, and uses dramatically less memory.
Of the benchmarks where Java wins, at least one (regexp-dna) is not related to the language at all and only to the regexp implementation, the one used there is a toy, Russ Cox already has written a much better high-performance regexp implementation based on re2 for Go which should replace the existing one very soon.
> I think its somewhat naive to think that it won't be hard to surpass the JVM.
Go already surpasses the JVM in many areas, for example it has magnitude orders lower memory usage, and even in performance it already beats it in quite a few benchmarks, see:
And this is without the simple optimizations that are coming soon to Go, and even after that Go still will be able to improve performance greatly without too much effort.
I love all those 'JVM roks!' or 'JVM is mature and stable!' stories. But I still unable to get it, why one user-level program (say, java.exe) must be better than any another user-level .exe? With its primitive and rudimentary integration with an OS (remember, it was designed to be isolated environment that runs everywhere, which means exactly opposition to efficiency and optimization). Wait! It can produce native code and able to run threads! Yeah, but LLVM produces much better code and there is clang++ with which we can build java.exe from its sources... ^_^
May be it rocks just because too much money was invested in the ecosystem and now they do everything possible to keep it breathing? ^_^ Remember? Your lovely Xeon CPU is a VM itself. Your lovely Virtualization stack on top of your OS is what? Do we still need so many layers of VMs? ^_^
btw, MS DOS is also quite mature, stable and production ready environment. Especially with something like qemm.exe and desqview.exe (do you remember them?)
If I remember Cliff Click's [Azul] lecture "A JVM does what?" correctly, each machine whether JVM or x86 defines what is managed by the machine and what isn't.
Just as x86 represents a machine which defines op codes only and leaves memory and process management to the operating system, the outcome of JVM's choices about taking responsibility for garbage collection, security, machine code generation is an interesting machine which can provide performance gains through time, just like Moore's law.
I'm not sure I understand what does compiling a javam have to do with replacing a vm with a compiler? The jvm has really good garbage control and a good jit compiler. LLVM has some of the stuff needed for writing a jit compiler for a vm. I'm not sure whether a compiler for a garbage collected language will be faster then a jit compiler.
2. If I were to aim for a self-hosted go on the JVM, this could easily be one of the steps. Compile a 'Go written in Go' with this, and you are done (well, you would probably want to tune the runtime afterwards to get decent performance, but those are 'merely' details)
I think this is the biggest reason. Go has been stabilizing over the past few months but it definitely still is in development. Gofix helps with this but only so far...
Sure, but pretty much any JVM language that compiles to bytecode can be translated to run on Dalvik VM using standard Android tools.
What I'm asking for is it the result usable.
It must be some kind of world record: I have gotten exactly two characters into this language and already I'm demoralized by its user experience. ;)