Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Google's Go Gets Faster

Google's Go Gets Faster

Leia em Português

This item in japanese

Go 1.3 has been released after almost 3 months of beta. The new version has no language changes over 1.2, but comes with several performance improvements, support for running command-line programs under Native-Client and several other enhancements.

Some of the most interesting performance and implementation changes -

  • Go routine stacks now use a contiguous model instead of the old "segmented" model
  • GC is faster - uses concurrent sweep algorithm, has better parallelization and larger pages; leading to 50-70% reduction in GC pause times. It is also now precise when examining values on the stack too.
  • Runtime handles defers more efficiently
  • Race detector is around 40% faster
  • Regexp (regular expressions package) now has a second, one-pass execution engine making it faster for certain simple expressions
  • sync.Pool - a new type that provides efficient mechanism for implementing caches whose memory can be reclaimed by the system
  • Iterations over small maps (maps with 8 or fewer elements) no longer happen in consistent order; this is to avoid developers writing code that depends on map iteration order, since such code would work well only on some systems

There are also several tooling improvements -

  • godoc can now perform static analysis of the code it indexes
  • misc/benchcmp (benchmarking tool) has been rewritten as a Go program
  • Compilers and linkers have been refactored; the instruction selection phase has been moved to the compiler, which can speed up incremental build times for large projects
  • gc toolchain now supports Native Client (NaCl) execution sandbox on 32- and 64-bit Intel architectures. Note that Go 1.3-generated binaries still cannot be run directly by Google Chrome.

There is also a security fix for the crypto/tls library.

You can read more about all the changes in the release notes

Rate this Article