Short definitions of every term this learning material uses. The lesson in brackets is where it is explained.
| Term | Meaning |
|---|---|
| Alignment | The address multiple at which a value must start; the cause of struct padding. (2.d) |
| Arena | A region of the heap reserved from the OS (3.c); also a pattern of allocating many objects from one block and freeing them together. (3.e) |
| Atomic | An operation on one word that completes indivisibly. (4.d) |
| Attention | The transformer operation in which a token gathers information from earlier tokens. (6.e) |
| Backpressure | A slow consumer slowing its producer, usually through a bounded queue. (4.f) |
| Bounds check | The run-time test that an index is within a slice; removable when provably safe. (5.b) |
| BPE | Byte-pair encoding: a tokenizer built by repeatedly merging the most frequent adjacent pair. (6.d) |
| Cache line | The 64-byte unit in which the CPU loads and owns memory. (5.c) |
| cgo | Go’s mechanism for calling C. (5.d) |
| Channel | A typed, synchronized queue between goroutines. (4.b) |
| Closure | A function value that captures variables from its surroundings. (1.c) |
| Context | A value carrying cancellation, a deadline and request-scoped data down a call chain. (4.c) |
| Data race | Unsynchronized concurrent access to a variable, at least one a write. (4.e) |
| Devirtualization | Turning an interface method call into a direct call. (5.b) |
| Dynamic batching | Grouping requests that arrive close together into one model call. (6.h) |
| Embedding | A vector representing an item so that similar items are close together. (6.g) |
| Escape analysis | The compiler pass deciding whether a value can live on the stack. (3.b) |
| False sharing | Independent variables on one cache line slowing each other’s writers. (5.c) |
| G, M, P | Goroutine, OS thread, and scheduling context. (4.a) |
| Generics | Functions and types with type parameters constrained by interfaces. (2.f) |
GOGC | The heap growth percentage that triggers the next garbage collection. (3.d) |
GOMAXPROCS | The number of Ps: how many goroutines run Go code at once. (4.a) |
GOMEMLIMIT | A soft ceiling on the runtime’s total memory. (3.d) |
| Goroutine | A function running concurrently on its own small, growable stack. (4.a) |
| Green Tea | The span-oriented garbage collector implementation, default since Go 1.26. (3.d) |
| Happens-before | The ordering relation that defines when one goroutine’s write is visible to another. (4.e) |
| Heap | Memory that outlives a function call, managed by the allocator and the GC. (3.a) |
| HNSW | A graph-based approximate nearest-neighbour index. (6.g) |
| Inlining | Replacing a call with the callee’s body. (5.b) |
| Interface value | Two words: a type (or method table) and a data pointer. (2.e) |
| Iterator | A function that can be ranged over, yielding values one at a time. (2.f) |
| IVF | An approximate index that searches only the partitions nearest the query. (6.g) |
| KV cache | Stored attention keys and values for previous tokens. (6.e) |
| Logits | The model’s raw scores, one per vocabulary entry. (6.e) |
| mcache / mcentral / mheap | The allocator’s per-P, per-size-class and global tiers. (3.c) |
| MCP | Model Context Protocol: a standard for exposing tools and data to models. (6.i) |
| Method set | The methods available on a type; decides interface satisfaction. (1.d) |
| Module | A versioned tree of packages with a go.mod file. (1.e) |
| Netpoller | The runtime component that parks goroutines on network I/O and wakes them. (5.e) |
| PGO | Profile-guided optimization using a production CPU profile. (5.b) |
| Preemption | The runtime interrupting a long-running goroutine. (4.a) |
| Recall | The fraction of true nearest neighbours an approximate search returns. (6.g) |
| Rune | A Unicode code point; int32. (2.b) |
| Size class | One of the fixed object sizes the allocator serves. (3.c) |
| Slice header | Pointer, length and capacity describing a window on an array. (2.a) |
| Span | A run of 8 KB pages dedicated to one size class. (3.c) |
| SSE | Server-Sent Events: the streaming format used by LLM APIs. (5.e, 6.f) |
| Stack | Per-goroutine memory for function frames; grows by copying. (3.a) |
| Swiss table | The hash-table design behind Go’s maps since 1.24. (2.c) |
sync.Pool | A cache of reusable temporary objects, emptied by the GC. (3.e) |
| Tensor | A flat array of numbers plus a shape. (6.b) |
| Tool call | A model’s request that the program run a named function with JSON arguments. (6.i) |
| Tri-colour marking | The white/grey/black algorithm the collector uses to find live objects. (3.d) |
| Work stealing | An idle P taking runnable goroutines from another P’s queue. (4.a) |
| Write barrier | Code run on pointer writes during GC marking to keep it correct. (3.d) |
| Zero value | The default every variable starts with: 0, "", false, nil. (1.b) |