If you understand how the CPU, memory, network, and disk are processing your program and its structures, you can design your programs to optimize for the hardware.
Full guide for ref: https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TI...
True. The guide is an interesting read. When you are deep in the trenches, most of what the github link says is just common sense.
Eg: < Optimize for the slowest resources first (network, disk, memory, CPU) in that order, after compensating for the frequency of usage, because faster resources may be used many times more. For example, a memory cache miss may be as expensive as a disk fsync, if it happens many times more.>
This is just obvious common sense. Great read.
Yeah, except the CPUs are complex, you might not understand ALL the details of a working program (like randomising memory layout).
Plus not all speed-ups are made equal. Some speedups of a part of program can have no or even negative impact (as in making part of program faster slows down overall program execution).
This is also true for garbage collected languages, JavaScript in my case, but it requires a custom profiler and a bit more digging while asking better questions.