8 ms·
Also, there still plenty of low hanging fruit to optimize in Go, both in the compilers and GC, so surpassing Java wont be hard. And Go's memory usage is alread
by uriel 15y ago
Also, there still plenty of low hanging fruit to optimize in Go, both in the compilers and GC, so surpassing Java wont be hard.
And Go's memory usage is already magnitude orders better than Java.
- lukesandberg 15y agoI 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.
- burgerbrain 15y agoA staticly typed language compiled to native code surpassing the JVM? That's not naive, that is commonplace... GC is the only sticky factor here.
- lemming 15y agoNo, it's not commonplace. http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php http://shootout.alioth.debian.org/u32/which-programming-lang... Only 4 languages are faster than Java 6, two of which almost no-one uses. Java generally loses on memory use, but not on performance these days.
- burgerbrain 15y agoFirst 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.
- igouy 15y ago>>I don't think there has ever been a point in history which it [C++] doesn't cream Java<< Still waiting for that faster C++ fannkuch-redux program (and still waiting for a C fannkuch-redux program that uses multi core). http://shootout.alioth.debian.org/u64q/benchmark.php?test=fannkuchredux&lang=all http://shootout.alioth.debian.org/u64q/benchmark.php?test=fa... >>when you weight by funding<< Please show total $$$ amounts spent on the development of each programming language over the last several decades - so we can weight by funding. (Should funding for Plan 9 compilers be accounted as funding for Go? Should funding for GCC compilers be accounted as funding for GCCGO?) >>I find their Fortran statistic suspect as well ... At least in scientific computing...<< When you don't look, you won't find - http://shootout.alioth.debian.org/u64q/performance.php?test=nbody http://shootout.alioth.debian.org/u64q/performance.php?test=... http://shootout.alioth.debian.org/u64q/performance.php?test=spectralnorm http://shootout.alioth.debian.org/u64q/performance.php?test=...
- burgerbrain 15y agoI don't have the time to, nor do I care to, evaluate the legitimacy of their benchmarking suite. But, are you honestly suggesting that Java hasn't had dramatically more corporate funding than Go? Don't be absurd.
- igouy 15y agoHere'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".
- burgerbrain 15y agoIf 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. Funny how that works.
- fleitz 15y agoI 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.
- igouy 15y ago>>any real user<< Scientists solving n-body problems are real users too. >>doesn't use optimized compilers for ... C#/F#<< What "optimized compiler" do you suggest for linux C#/F# ? Meanwhile http://shootout.alioth.debian.org/demo/compare.php?lang=csc&lang2=csharp http://shootout.alioth.debian.org/demo/compare.php?lang=csc&... >>many more than 4 language implementation<< lemming wrote "Only 4 languages are faster", not only 4 language implementations are faster.
- fleitz 15y agoFor 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)
- igouy 15y agoHow 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.
- uriel 15y agoWhen Go is involved, it is better to compare the 64bit compilers which are the ones used by almost everyone: http://shootout.alioth.debian.org/u64/benchmark.php?test=all&lang=go&lang2=java http://shootout.alioth.debian.org/u64/benchmark.php?test=all... 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.
- igouy 15y agoWhy did't you suggest the quad-core x64 measurements? http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=go&lang2=java http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...
- uriel 15y ago> 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: http://shootout.alioth.debian.org/u64/benchmark.php?test=all&lang=go&lang2=java http://shootout.alioth.debian.org/u64/benchmark.php?test=all... 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.