Ah, this brings back memories. We had this MACRO-11
concept called
âthreaded codeâ (not threads in the multiprocessing sense).
Essentially we had very small code fragments that were loaded into a table
and weâd run them to process data with very light JSR/RET linkage
(minimal register saves).
Getting back to Richieâs idea of lightweight functions, it indeed is a
more maintainable style and perhaps ahead of itâs time when modern
highly optimized inlining compilers came around it made it efficient
without the programmer needing to wrap his head around it too much.
It brought back memories for me, too. At Ardent, we had a 4-processor
system with each processor a vector processor. We wanted to be able to go
between parallel and serial very quickly, and the key to achieving this
was to have all 4 threads share the stack. So in the parallel sections,
all function calls had to be lightweight (only JSR/RET) and keep their
paws off some of the registers (including the stack pointer). It worked
beautifully, giving us a 3.99 times speedup with 4 processors when we were
in its sweet spot.