Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Google releases programming language Go version 1.21: cancels support for Microsoft Win7/8 and Apple macOS 10.13Universe 10.14

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > IT Information >

Share

Shulou(Shulou.com)11/24 Report--

CTOnews.com, August 10 (Xinhua)-- Google today released a new version 1.21 for the programming language Go. Most of the changes focus on the implementation of tool chains, runtimes and libraries. Google has previously said that the Go language will remove support for older Microsoft Windows and Apple macOS systems in version 1.21.

▲ Google programming language Go version 1.21 release log CTOnews.com with Go 1.21 main updates are as follows:

The improved toolchain profile guided optimization (PGO) function has officially entered the stabilization phase (GA).

The enable profile Boot Optimization (PGO) feature, which was in the preview phase in 1.20, has now officially entered a stable phase. The principle of PGO is that "the compiler uses the program's runtime profiling information, so it can generate higher quality code, thereby improving the program's performance." If a file named default.pgo exists in the main package directory, the go command uses the default.pgo file to enable PGO build.

Language changes add new built-in functions:

Min, max, and clear have made several improvements to type inference of generic functions, including the description of type inference in the extension and interpretation specification.

In future releases, the development team plans to address the most common "loop variable capture" problem in Go programming, and the development team has provided a "preview" solution in Go 1.21, which users can now use "environment variables" to enable in their code.

Add a new standard library log / slog package: for structured logging

Slices package: added to perform common operations on slices of any element type. This package is faster and more ergonomic than sort package.

Maps package: for common operations on any type of key-value

Cmp package: used to compare ordered values (ordered values).

Optimize performance Go compiler itself has rebuilt PGO on 1.21, so the speed of building Go programs has been increased by 2-4%, but officials say the specific optimization efficiency will depend on the host architecture.

Support for WASIGo 1.21 has experimental support for WebAssembly System Interface (WASI), Preview 1.

To facilitate writing more generic WebAssembly (WASM) code, the compiler also supports new instructions to import functions from the WASM host:

Go:wasmimport

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

IT Information

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report