Pidoku
Performance

Performance

AdvancedTopic5 lessons~4h 40m

Lessons, in order

About this topic

Topics III and IV explained what the runtime does. This topic is about measuring a program, understanding what the compiler and the CPU did with it, and making it faster on purpose.

#LessonThe question it answers
01Benchmarking and ProfilingHow do I measure correctly, and find where the time and memory go?
02The CompilerWhat do inlining, bounds-check elimination and PGO do to my code?
03Cache-Friendly DataWhy does data layout matter more than instruction count?
04cgo, SIMD and AssemblyHow do I reach native code and vector instructions, and what does it cost?
05Networking and the NetpollerHow does a Go server handle connections, and how do I stream a response?

When you finish you can write a trustworthy benchmark, read a CPU and heap profile, explain a speed-up in terms of cache lines and inlining, and build a streaming HTTP server that behaves under load. Topic VI uses every one of these.

↑↓ navigate↵ openesc close

drag to pan · scroll to zoom