This topic peeked under the hood a bit to help you understand what pointers are, how to use them, and—most importantly--when to use them. In this topic, you’ll see how Go implements methods, interfaces, and types, how they differ from other languages, and the powers they possess.
1 All these numbers are from an Apple M3 CPU with 64 GB of RAM. Different CPUs can produce different crossover points. You can run your own performance tests with the code in the
examples/pointer_perfdirectory. Run the command go test./… -bench=. to find your own results. (Benchmarks are covered in “Using Benchmarks”.)
Progress is saved on this device.