---
title: "How Swiss Tables make Go 1.24 faster"
publication: "Go Weekly"
issue: 544
published_at: "2025-03-05"
canonical_url: "https://golangweekly.com/issues/544"
---

Plus a way to call external library functions without Cgo. |        

#​544 — March 5, 2025 

[Unsub](https://golangweekly.com/leave/*|UID|*)|[Web Version](https://golangweekly.com/issues/544)  

Together with [![pgAnalyze\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_350,h_100/e_make_transparent/co_white,e_outline:7/lhwcvgc1asd4fzaahty4.png)](https://events.zoom.us/ev/AlEFPGvPxH6KNfpNmpZqz9VgcLKBd4PhtHLtfLFygO5sK3UqhQyd~Alb50FkSi_Bh3Z5sYtjD5N-uvSAEkOSUL3JtGU3PWulJwbQEfNvhFVG8k2pPT2-Mwr6pu8kfpPRfXGX0AJrx6Tor5Q)   

Go Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/q1u6gtfs2cf0rvmslxtb.jpg)](https://go.dev/blog/swisstable)  

[Faster Go Maps with Swiss Tables](https://go.dev/blog/swisstable) — One of Go’s newest features is a revamped map implementation powered by a new hash table algorithm called [Swiss Table](https://www.dolthub.com/blog/2023-03-28-swiss-map/) that boosts map operations up to 60% faster in microbenchmarks, while reducing memory overhead. Here’s a look at how it works. 

Michael Pratt   

[Tips to Debug Hanging Go Programs](https://michael.stapelberg.ch/posts/2025-02-27-debug-hanging-go-programs/) — Next time your Go app becomes unresponsive, these tips can help you find the issue by forcing a stack trace or using Delve to attach to the process (or core dump) and revive the program. 

Michael Stapelberg   [![\](https://res.cloudinary.com/cpress/image/upload/c_limit,w_480,h_480,q_auto/copm/f972df5d.png)](https://events.zoom.us/ev/AlEFPGvPxH6KNfpNmpZqz9VgcLKBd4PhtHLtfLFygO5sK3UqhQyd~Alb50FkSi_Bh3Z5sYtjD5N-uvSAEkOSUL3JtGU3PWulJwbQEfNvhFVG8k2pPT2-Mwr6pu8kfpPRfXGX0AJrx6Tor5Q) 

[Keep Postgres Maintenance from Slowing Down Your Go App](https://events.zoom.us/ev/AlEFPGvPxH6KNfpNmpZqz9VgcLKBd4PhtHLtfLFygO5sK3UqhQyd~Alb50FkSi_Bh3Z5sYtjD5N-uvSAEkOSUL3JtGU3PWulJwbQEfNvhFVG8k2pPT2-Mwr6pu8kfpPRfXGX0AJrx6Tor5Q) — Secure your spot to learn the proactive maintenance practices that uncover hidden database performance risks, like slow queries, checkpoint behavior, & connection issues, before they escalate. 

pganalyze sponsor   

[The Cost of Go's `panic` and `recover`](https://jub0bs.com/posts/2025-02-28-cost-of-panic-recover/) — When something goes unexpectedly and critically wrong in a Go program you might use `panic` to abort things quickly, but did you know you can use [`recover`](https://pkg.go.dev/builtin#recover) to manage what happens after a panic? This means you _could_ use it as a sort of control flow mechanism, if you were in a particularly unorthodox mood.. 

Julien Cretel   

💡 This post led to [a rather extensive discussion on Hacker News.](https://news.ycombinator.com/item?id=43217209)  

**IN BRIEF:** 

- 🇬🇧 [GopherConUK](https://www.gophercon.co.uk/) returns to London this August and [its call for papers](https://www.gophercon.co.uk/call-for-papers) has just opened if you'd like to speak. You can submit a talk up until May 17.
- [go-attention](https://github.com/takara-ai/go-attention) is an attempt to create a pure Go implementation of attention mechanisms and transformer layers, such as used in modern LLMs.   

[Calling Rust from 'Cursed' Go](https://pthorpe92.dev/cursed-go/) — Cgo is Go’s mechanism for calling external/foreign functions but its performance often causes consternation. Enter [purego](https://github.com/ebitengine/purego), a still-in-beta way to make such calls _without_ Cgo. 

Preston Thorpe   

[Nil Channels in Go](https://vishnubharathi.codes/blog/nil-channels-in-go/) — Nil channels seem to baffle many Gophers, so Vishnu went on a quest to figure out why in a particular case. This led him to the wisdom of a new Go proverb: “Init when you split; Nil when you merge.” 

Vishnu Bharathi   

[The Magic of Small Engineering Teams](https://dub.link/go-mar5) — How PostHog uses small teams to ship fast and scale at the same time. 

PostHog sponsor   

📄 [Minesweeper with Raylib Go Bindings](https://pliutau.com/minesweeper-in-golang-raylib/) – Alex reflects on the joys of basic game development in Go with Raylib and he [shares his code too.](https://github.com/plutov/packagemain/blob/master/minesweeper/main.go) Alex Pliutau 

📄 [We Switched from Java to Go and Don't Regret It](https://glasskube.dev/blog/from-java-to-go/) Miglinci, Steiner, and Enne (Glasskube)  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/z4tk4fottpeygdsom47a.jpg)](https://github.com/x-motemen/gore)   

[Gore 0.6: A Full Featured Go REPL Environment](https://github.com/x-motemen/gore) — You get all the niceties you’d expect like line editing, history, multi-line input, the ability to import packages, and, in this latest build, [gopls](https://github.com/golang/tools/tree/master/gopls)-powered code completion too. 

motemen   

[Go Clean Template](https://github.com/evrone/go-clean-template) — Inspired by Uncle Bob’s ‘Clean Code’ principles, this repo attempts to provide a ‘clean architecture template’ for building Go-powered services that are well organized and won’t turn into a mess. You be the judge. 

Evrone   

[go-git 5.14: An Extensible Git Implementation in Pure Go](https://github.com/go-git/go-git) — _“Manipulate git repositories at low level (plumbing) or high level (porcelain), through an idiomatic Go API.”_ Now requires Go 1.23+. 

go-git   

[sqldef 1.0: Idempotent Schema Management for Databases](https://github.com/sqldef/sqldef) — A Go-powered CLI tool and WASM library for diffing SQL schemas ([demo here](https://sqldef.github.io/)). Supports MySQL, Postgres, SQLite and SQL Server. Built by one of Ruby’s core team members, too. 

Takashi Kokubun   

- ⭐ [TinyGo 0.36.0](https://github.com/tinygo-org/tinygo/releases/tag/v0.36.0) – The much celebrated Go compiler 'for small places' gains Go 1.24 and LLVM 19 support, as well as support for several new boards.
- [MongoDB Go Driver v2.1](https://github.com/mongodb/mongo-go-driver/releases/tag/v2.1.0) – Officially supported driver to work with MongoDB. Now supporting MongoDB's new bulk write API and BSON vector datatype.
- [gocron v2.16.0](https://github.com/go-co-op/gocron/releases/tag/v2.16.0) – Job scheduling package for running Go functions at specified intervals.
- [Wait4X 3.0](https://github.com/atkrad/wait4x) – CLI tool for waiting on various ports or services to reach a specified state.
- [pgroll v0.10](https://github.com/xataio/pgroll/releases/tag/v0.10.0) – Tool for zero-downtime, reversible schema Postgres migrations.
- [Glow 2.1](https://github.com/charmbracelet/glow/releases/tag/v2.1.0) – Terminal-based Markdown rendering from the folks at Charm.
- [Pion WebRTC 4.0.13](https://github.com/pion/webrtc) – Pure Go implementation of the WebRTC API.
- [Sarama v1.45.1](https://github.com/IBM/sarama) – IBM's Go client library for Apache Kafka.
- [Hugo v0.145.0](https://github.com/gohugoio/hugo/releases/tag/v0.145.0)      

📰 Classifieds   

📌 **Faster Deployment** – Integrate CarsXE’s API in minutes and get real-time vehicle data with ease. [Try it now!](https://api.carsxe.com/?utm_source=Cooper+Press&utm_medium=email&utm_campaign=Cooper-press-mar-5) 

--- 

[Blacksmith runs GitHub Actions 2x faster at half the cost](https://blacksmith.sh/?utm_source=cooperpress&utm_medium=secondary&utm_campaign=mar5&utm_term=go) with a one-line code change. Trusted by 250+ companies like Ashby and Clerk.     

📢 Elsewhere in dev  

A quick roundup of some of other interesting stories in the broader landscape, in case you've missed them: 

- 🤯 Someone managed to implement 90s FPS game _Doom_ [entirely in the TypeScript type system.](https://socket.dev/blog/typescript-types-running-doom)
- And if you've never quite grokked how TypeScript ticks, Dr. Axel Rauschmayer has [a succinct explanation of how it differs from JavaScript](https://2ality.com/2025/02/what-is-typescript.html) in a practical day-to-day tooling sense.
- 🤖 Microsoft and GitHub are getting into the 'AI developer agents' game and have [showed off a look at _GitHub Copilot_ 'agent mode'](https://code.visualstudio.com/blogs/2025/02/24/introducing-copilot-agent-mode) running in VS Code.
- Is it possible to think about game 'speedrunning' as essentially [a form of vulnerability research?](https://zetier.com/speedrunners-are-vulnerability-researchers/)         

Curated by Peter Cooper and [Glenn Goodrich](https://twitter.com/ruprict). 

[Change your email](https://golangweekly.com/edit_subscription/*|UID|*)
[Stop getting this newsletter](https://golangweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
