Five months after the release of Go1.18, Go1.19 was released on schedule. However, most of its changes are in the toolchain, runtime and library implementation. As always, this release maintains the Go 1 compatibility promise. So almost all Go programs continue to compile and run as before.

picture

Important changes in Go 1.19 are:

  • Go 1.19 rounds out and improves on Go 1.18. The development team focused generics development for Go 1.19 on addressing some minor issues and corner cases reported by the community, as well as significant performance improvements (up to 20% performance improvements for some generic programs).

  • Go memory model, please refer to the official documentation for details: https://go.dev/ref/mem. With the update of the memory model, Go 1.19 introduced new types in the sync/atomic package: types Bool, Int32, Int64, Uint32, Uint64, Uintptr and Pointer, etc., which make the use of atomic values ​​more convenient.
  • In terms of tools, the document format is enhanced. Added support for links, lists, and clearer headings in documentation comments. For details, see: https://go.dev/doc/comment.
  • In terms of runtime, the most noteworthy change is the addition of runtime/debug.SetMemoryLimit, which can limit the memory usage of Go.
  • In addition, Go 1.19 includes various performance and implementation improvements, including dynamically adjusting the initial goroutine stack to reduce stack copying, automatic use of additional file descriptors on most Unix systems, use of large switch statements on x86-64 and ARM64 Jump tables, support for debugger injection function calls on ARM64, register ABI support on RISC-V, and experimental support for Linux running on LoongArch 64-bit architecture ( GOARCH=loong64 ).

Others are small changes to some libraries.

Detailed changes can be found in the official Release Notes: https://go.dev/doc/go1.19.

Go language Chinese website has also prepared the download package of Go1.19 for everyone: https://studygolang.com/dl.


Recommended reading

Welfare

I have compiled a package of Go learning materials from entry to advanced for everyone , including learning suggestions: what to watch for entry and what to watch for advanced. Follow the public account "polarisxu" and reply to ebook to get it; you can also reply to "join the group " to communicate and learn with tens of thousands of Gophers.

picture