8 ms·
Back in the day on the Mac, the order of source files in your project would determine locality in the binary. If memory serves, this was with MPW C or maybe Co
by OnlyMortal 2y ago
Back in the day on the Mac, the order of source files in your project would determine locality in the binary.
If memory serves, this was with MPW C or maybe CodeWarrior.
You could see the jump (jmp) instructions use short jumps rather than long ones.
- rurban 2y agoThis is still relevant. I had big success in writing an order optimizer for perl5
- fsflyer 2y agoThe Metrowerks profiler and linker worked together to optimize locality in the binary, the focus was on PowerPC code. The linker could generate the static call tree, but the profiler could generate a dynamic call tree of what was actually called. Separating out the cold portions of the call tree into portions of the executable that didn't get paged in was the goal. I worked on the Profiler and I seem to remember that Microsoft was one of the developers that put a bunch of effort into using this to optimize the Office suite on Mac. I remember the release of Word that used it was snappier.
- Iwan-Zotow 2y agosame in MS DOS you have far and near pointers modifiers
- teo_zero 2y agoNot only jumps. The Motorola 68000 has a relative addressing mode where any sufficiently near address can be expressed as PC+offset. Offset is 16 bits, thus covering a local range of ±32kB, with the additional benefit of being position-independent, a valuable feature for systems without virtual memory. Having learned to program for the Amiga before Intel-based PCs, I was shocked when I realized that the latter are missing that basic feature and position-independent executables must go through run-time relocation!