Menu
Go 1.15 moves to beta, offering smaller binary sizes

Go 1.15 moves to beta, offering smaller binary sizes

New version of Google-built language focuses on compiler, runtime, and linker improvements

Credit: Dreamstime

Go 1.15, the next version of Google’s popular open source, statically typed, compiled language, produces smaller binary sizes through an enhanced compiler. The runtime and linker also have been improved in the forthcoming release.

Typical binary sizes in Go 1.15, which is due for a production release in August, are reduced by about five percent compared to Go 1.14. This reduction is achieved by eliminating certain types of garbage collection metadata and more-aggressively eliminating unused type metadata.

In another compiler improvement, the toolchain now mitigates Intel CPU erratum SKX102 on GOARCH=amd64 by aligning functions to 32-byte boundaries and padding jump instructions. Although this padding increases binary sizes, this increase is more than compensated for by the release’s binary size improvements. Additionally, Go 1.15 adds a -spectre flag to the compiler and the assembler to enable Spectre CPU vulnerability mitigations, though the Go team advises that these should almost never be needed.

The compiler in Go 1.15 also now rejects //go: compiler directives that have no meaning for the declarations they are applied to, reporting a “misplaced compiler directive” error. These misspelled directives were broken previously, but were silently ignored by the compiler.

Instructions for downloading the Go 1.15 beta can be found at golang.org. Other improvements in Go 1.15, based on release notes, include:

  • The compiler’s -json optimization logging now reports large copies as greater than or equal to 128 bytes, and provides explanations of escape analysis decisions.
  • For the runtime, allocation of small objects now performs better at high counts and has lower worst-case latency. Further, non-blocking receives on closed channels now perform as well as non-blocking receives on open channels.
  • Substantial improvements have been made to the Go linker, reducing linker resource usage. For a representative set of large Go programs, linking was 20 percent faster and used 30 percent less memory on average, for ELF-based operating systems on AMD64 architectures, with more-modest improvements for other architecture/OS improvements. Key to the better linker performance are a newly redesigned object file format and a revamping of internal phases to boost concurrency. 
  • With the Go command, the GOPROXY environment now supports skipping proxies that return errors. Proxy URLs now can be separated with commas or pipe characters. Also, various flag parsing issues in go test and go vet have been fixed.
  • The core library now includes a package, time/tzdata, that permits embedding the time zone database into a program.
  • The vet tool now warns about conversions of the form string (x) where x has an integer type other than rune or byte. The vet tool also now warns about type assertions from one interface type to another interface type when the type assertion will always fail. 

Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Featured

Slideshows

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards

Hundreds of leaders from the New Zealand IT industry gathered at the Hilton in Auckland on 17 November to celebrate the finest female talent in the Kiwi channel and recognise the winners of the Reseller News Women in ICT Awards (WIICTA) 2020.

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards
Leading female front runners honoured at the 2020 Reseller News Women in ICT Awards

Leading female front runners honoured at the 2020 Reseller News Women in ICT Awards

The leading female front runners of the New Zealand ICT industry joined together for the annual Reseller News Women in ICT Awards event at the Hilton in Auckland, during which hundreds of guests celebrated 13 outstanding individuals who won awards, chosen from more than 50 finalists representing over 30 organisations.

Leading female front runners honoured at the 2020 Reseller News Women in ICT Awards
Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

More than 500 channel leaders gathered in Auckland on 21 October at the ​Reseller News Innovation Awards ​2020 to celebrate the achievements of the New Zealand technology industry's top partners, start-ups, vendors, distributors and individuals.

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners
Show Comments