Go 1.26 unleashes performance-boosting Green Tea GC
Briefly

Go 1.26 unleashes performance-boosting Green Tea GC
"Generic types in Go 1.26 now may refer to themselves in their own type parameter list. This change simplifies implementation of complex data structures and interfaces, the Go team said. The newfunction, which creates a new variable, now allows its operand to be an expression, specifying the initial value of the variable. And the go fix command now is the home of Go's modernizers, providing a push-button way to update Go codebases to the latest idioms and core library APIs."
"The compiler can allocate the backing store for slices on the stack in more situations, thus improving performance. For WebAssembly applications, the runtime now manages chunks of heap memory in smaller increments, leading to significantly reduced memory usage for applications with heaps less than around 16 MiB in size. On 64-bit platforms, the runtime now randomizes the heap base address at startup."
"This a security enhancement that makes it harder for attackers to predict memory addresses and exploit vulnerabilities when using cgo, the Go team said. An experimental profile type named goroutineleak reports leaked goroutines. Look for it in the runtime/pprof package. An experimental simd/archsimd package provides access to architecture-specific SIMD operations. Go 1.26 is the last release to run on macOS 12 Monterey. Go 1.27 will require macOS 13 Ventura or later."
Generic types in Go 1.26 can reference themselves within their own type parameter lists, simplifying complex data structure and interface implementations. The new operator accepts expression operands to set initial variable values. The go fix command now hosts modernizers that automatically update code to current idioms and core library APIs. Baseline runtime overhead for cgo calls is reduced by about 30%. The compiler can allocate slice backing stores on the stack in more cases to improve performance. WebAssembly runtimes manage heap in smaller increments to lower memory usage for heaps under about 16 MiB. Heap base randomization on 64-bit platforms enhances security. Experimental additions include a goroutineleak profile in runtime/pprof and an simd/archsimd package. macOS support will require Ventura starting in Go 1.27.
Read at InfoWorld
Unable to calculate read time
[
|
]