System-level programming language performance Big PK jokes-go language

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Like and do not like go language are like to take performance PK said things.

Spread more widely is benchmarksgame PK data: http://benchmarksgame.alioth.debian.org/u64q/go.php

In Benchmarksgame
In the test, the performance of the go language has been very bad until now and C language flat or twice times the gap, of course, there are
3 Test performance gaps are relatively large.

I will not elaborate on the specific reasons, you can refer to my other article: Go1.1 Performance test report (and C Gap within 10%).

Of course, a lot of go language black is never believe the performance of the go language, especially not believe and C gap within 10% of the argument.
But in this foreigner's latest test results, go performance is beyond the GCC performance (gcc than clang some gaps).

Recently, another foreign blogger has evaluated the performance of various system-level programming languages, and the post-translation title gives the word PK.
The content summary has 2 points: D is very NB (Clang's 99% performance) and the clang go performance (22% of the bottom).

This performance test results almost every few days on a surprise, specific data please see:

1. Go performance is clang 22% (2012.07.24)

Anonymous readers wrote
"C + + has ruled the system for a long time, with the exception of Objectivec language, which is not highly focused. People have written the same map generation tools in multiple system-level languages to test their performance, including D (DMD,LDC,GDC), Go (gcc-go,6g), Haskell (GHC), and rust. These languages natively support advanced features such as garbage collection, and therefore none of them can run at the same speed as in C/C + +. One of the worst performers is the native go language compiler 6g, which has only clang22% speed, and the best performance is based on the LLVM D language compiler LDC, reaching 79%. Since the original was built using LLVM, Rust became the fastest in the native compilers of each language, but only reached 45%. From the results, D language must be preferred. Because many of the features of the D language rely on garbage collection, rust is recommended if you need to turn off garbage collection and maintain a good experience with it. ”

Go language honors 22% of the bottom!

Link: System-wide programming language performance PK

2. Go performance is clang 51% (2013.07.27)

Anonymous readers wrote, "When the Last Post, the author optimization is not enough, now in a few days after the change results completely different."
C + + has dominated the system programming for a long time, except for the Objectivec language can not get very high attention. People have written the same map generation tools in multiple system-level languages to test their performance, including D (DMD,LDC,GDC), Go (gcc-go,6g), Haskell (GHC), and rust. These languages natively support advanced features such as garbage collection, and therefore none of them can run at the same speed as in C/C + +. One of the best performing is the LLVM-based D language compiler LDC, which can achieve 96% faster than the same LLVM-based C compiler clang. The next is the LLVM-based Rust compiler, which reaches 89%. Because LLVM compiled optimizations are doing so well, even GCC can only reach clang 72%. Another surprising result is that the JVM-based Scala can achieve clang70% speed. Almost equivalent to GCC. "

Because the previous news just soon, there is a reply that the original site data has been updated. The performance of the Go language is about 51%.

This news is the previous supplement, because no bottom also not prominent, also closed not to mention the performance test results of the go language.

Foreign Original website author also uses the more tactful saying: The go language lets the person be pleasantly surprised! (I don't know what it's worth to be surprised by the 51% countdown performance).

Link: System-level programming language performance PK

3. Continue PK, go language performance is 69%, GCC is 72% (2013.07.30)

4. Continue PK, go language performance is 75%, GCC is 81% (2013.08.??)

This data changes the domestic website is not all updated. Among them, there are some subtle changes in the process.

Some of the site's data also stay in the 22% era, for example, has been helping the code farmer to save the password of the CSDN Big website:
System-level programming language performance large PK D language into the preferred.

5. Go language performance is 87%, GCC is 81%, the ultimate PK? (2013.08.06)

Compiler Speed(s) %FastestClang    0.280    100%LDC      0.281    99%FCC**    0.283    99%Rustc    0.303    92%6g       0.323    87%G++*     0.330    85%Scala    0.344    81%GCC      0.347    81%LLVM-GHC 0.428    65%GHC      0.546    51%DMD      0.567    49%GCCGO    0.598    47%

Foreign original website: benchmarking level Generation:go, Rust, Haskell and D (and now Scala)

End

In fact, I would like to this PK in the performance of the various language curves drawn out, especially how go language from 22% to the bottom of the first
To 87% on the medium-to-high trend. I believe other languages have similar changes, but not as much as the changes in the Go language
A feeling of being pregnant.

One of the reasons I want to make a big change in the go language is that the Go test code written under the premise of being unfamiliar with the go language sucks,
Not exactly the same test environment. Specific performance has the following points:

    • 6g Default int is int64 and C default int32 compare performance
    • The random number generation function of the Go language System package is different for the concurrent scenario and the C language random number design target, and the algorithm is different.
    • C language code is all allocated space on the stack, the Go language code should not make a lot of places
    • Many awkward words in the Go Language code (previous versions)
    • D language test directly closed subscript out of bounds detection ( -noboundscheck ), go language is open
    • Of course, these are the reasons for go powder ...

Finally, I summed up the experience is: do not take the results of various PK seriously, to pay attention to its changing process, this is more interesting!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.