Go

Technical Journal // Go
Apr '26

Part 2: Decoupling the Renderer: Terminal to Raylib in One Interface

If your game logic knows about OpenGL, your architecture has failed. This post dissects the Interface Segregation Principle in Go, demonstrating how the Derelict Facility engine swapped an ANSI terminal renderer for hardware-accelerated Raylib without changing a single line of game simulation code.

Apr '26

Part 1: Data-Oriented Design in Go: Why [][]Tile Destroyed My Game Engine

The textbook answer for a 2D grid in Go is a slice of slices. In a systems-level game engine running at 60 FPS, this innocent data structure becomes a performance landmine. This post explores pointer chasing, CPU cache lines, and how flattening a 2D map into contiguous memory creates massive performance gains through Data-Oriented Design.

Mar '26

Understanding CPU Caches in Go

A practical guide to understanding how CPU caches (L1/L2/L3) impact Go service performance, with benchmarks on modern hardware.

Mar '26

WSL2 Is Slow? Fix /mnt/c/ File System Performance & Go Latency

Why is WSL2 so slow? Understand the 9P filesystem boundary, why /mnt/c/ degrades Go build times, and how to fix WSL2 performance bottlenecks on Windows.

Mar '26

What is a Mutex?

What is a mutex?

Jan '26

Go Struct Field Alignment: How Memory Padding Wastes Your RAM

How CPU word alignment and struct field ordering silently inject memory padding in Go. Learn field reordering to cut heap memory allocations and cache misses.

Jan '26

Memory Mechanics In Go - Stack vs Heap

When thinking about performance, it's easy to focus on Big O notation. But in Go, the difference between the Stack and the Heap is often the difference between a service that scales and one that chokes on GC pauses. This post explores escape analysis, the "Pointer Myth", and why passing by value is often 40x faster than passing by pointer.

Jan '26

Go Garbage Collector Mechanics: Pacer, GOGC, and Allocation Latency

How Go's concurrent tri-color mark-sweep collector works under the hood. Learn pacer triggers, GOGC tuning, and zero-allocation memory pool patterns.

Apr '25

Bitmasking In Go

Bitmasking is one of those computer science tricks that feels like wizardry, until you realize it's just some clever shifting and binary math. This blog explores the idea, shows how we use it in Go, and why it's surprisingly useful when working with databases like Couchbase.

Feb '25

Understanding T and *T method receivers in Go

In Go, method receivers determine whether a method acts on a copy of a value or a reference to it. This choice isn't just about performance; it affects correctness and behavior, especially when dealing with synchronization primitives (mutex, wait group, etc), slices, and embedded types.