Sunday, October 19, 2025
HomeGolangGo 1.24 brings massive enhance to map lookups - Releases

Go 1.24 brings massive enhance to map lookups – Releases


Simply wished to congratulate the Golang workforce for his or her effort in dramatically bettering the efficiency of map lookups on this newest launch.

I keep a repo of Conways Sport of Life in many alternative languages (GitHub – KieranP/Sport-Of-Life-Implementations: Conway’s Sport of Life implementation in numerous languages). Every so often I benchmark the newest variations.

Inside my implementations, there’s a operate/technique known as “render”, which loops over rows (X) and columns (Y), fetches the worth from the map for that given X/Y coord, after which concats to a string relying on the worth.

In Go 1.23, this code at it’s quickest took 0.261ms per iteration, with the typical being 0.278ms. It may full 74324 iterations inside 30 seconds, rating it at tenth general.

In Go 1.24, this code at it’s quickest now takes 0.185ms per iteration, with the typical being 0.195ms (about 30% faster). It now completes 97378 iterations inside 30 seconds (about 24% extra), placing it at fifth place.

This required no code modifications, simply replace Go, recompile, and go.

Implausible!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments