A big part of programming is about making choices: What data type do I use? A map, a slice, something more fancy? Do I implement this using recursion or a loop? Should I pass a value or a pointer? How to determine the best choice? One way is to measure performance using benchmarks. Go has built-in support for benchmarking in the testing package. In this article you’ll see how benchmarks are structured, what to keep in mind when writing them and how to execute them.