Member-only story

Exploring Go 1.24: What’s New and Why It Matters

A Preview of Go 1.24 Innovations

Stefanie Lai
3 min readJan 6, 2025
AI generated

Go 1.24 has been finished and is ready to be launched in Feb. 2025. As usual, let’s take a quick preview of its new features.

Compiler

There are three optimizations in the complier.

The most important one lies in the underlying map implementation, which saves memory overhead by 2–3% and improves read and write efficiency by switching to languages like Rust to implement swisstable hash data structure. To know more about it, please turn to the proposal runtime: use SwissTable.

The second optimization is spin mutex, which reduces the thread switching overhead by adding a spinning state to the thread.

The last one enables GC to handle pointers more flexibly by adding AddCleanup function to the pointer type.

Standard Library

Compared with previous versions, not many generics-related language features are added in version 1.24, which only officially introduces the experimental feature slice type alias of 1.23 and expands the scope of the original type alias with type SliceExp[T any] []T.

type S= SliceExp[string] 
var s S
fmt.Println(len(s))

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Stefanie Lai
Stefanie Lai

Responses (3)

Write a response

Wow, this breakdown of Go 1.24 is exactly what I needed! I was struggling to keep up with all the updates, especially the new optimizations in the compiler. The SwissTable hash implementation sounds like a game-changer for performance! Also, the…

Great article, to the point and with examples

Great article! Thanks for writing!