Go 1.17 is released - The Go Blog

submited by
Style Pass
2021-08-16 21:30:03

This release brings additional improvements to the compiler, namely a new way of passing function arguments and results. This change has shown about a 5% performance improvement in Go programs and reduction in binary sizes of around 2% for amd64 platforms. Support for more platforms will come in future releases.

We’ve also introduced pruned module graphs in this release. Modules that specify go 1.17 or higher in their go.mod file will have their module graphs include only the immediate dependencies of other Go 1.17 modules, not their full transitive dependencies. This should help avoid the need to download or read go.mod files for otherwise irrelevant dependencies—saving time in everyday development.

Go 1.17 comes with three small changes to the language. The first two are new functions in the unsafe package to make it simpler for programs to conform to the unsafe.Pointer rules: unsafe.Add allows for safer pointer arithmetic, while unsafe.Slice allows for safer conversions of pointers to slices. The third change is an extension to the language type conversion rules to allow conversions from slices to array pointers, provided the slice is at least as large as the array at runtime.

Finally there are quite a few other improvements and bug fixes, including verification improvements to crypto/x509, and alterations to URL query parsing. For a complete list of changes and more information about the improvements above, see the full release notes.

Leave a Comment