Google's Go Gets Faster

| by Roopesh Shenoy Follow 0 Followers on Jun 21, 2014. Estimated reading time: 1 minute |

A note to our readers: You asked so we have developed a set of features that allow you to reduce the noise: you can get email and web notifications for topics you are interested in. Learn more about our new features.

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

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Still no proper exception handling? by James Gan

Multi-value return is not the excuse. As many dynamic languages provide both multi-value return and exception handling. Don't want to fall back to the if...else approach, which is a drawback in my mind.

Re: Still no proper exception handling? by Roopesh Shenoy

Go has a conceptually different view on exceptions. Especially you use panic() to indicate something is terribly wrong without assuming that the caller can handle it; for all other purposes, you use multiple return values.

It's an interesting design choice, considering the abuses of exceptions, especially when they are used for control flow. IMHO if.. else.. is much better for control flow than exceptions, especially for a systems language such as Go.

Re: Still no proper exception handling? by James Gan

IMO, this choice of Google Go makes code look ugly. With python/ruby or any other language with exception handling, business logic can be expressed in a neat approach. Now the same code is mixed with various error-checking and different concerns are mixed together. It's a bad thing in my mind.

I don't think it's reasonable to prune an important feature because people can abuse it.

Having said that, I actually like Google Go language for it's lightweight footprint and good support for parallelism.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

3 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you