Go 1.15 arrives with smaller binary sizes

Go 1.15, the latest version of Google’s popular open source, statically typed, compiled language, was published as a production release on August 11. Among the new capabilities is an enhanced compiler that produces smaller binary sizes. The runtime and linker also have been improved.

Typical binary sizes in Go 1.15 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.

To read this article in full, please click here



from InfoWorld https://ift.tt/3g7ZKdt

No comments:

Powered by Blogger.