Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.linux.misc    |    Linux-specific topics not covered by oth    |    135,536 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 135,267 of 135,536    |
|    The Natural Philosopher to All    |
|    Re: Memory Safety (Re: Python: A Little     |
|    07 Feb 26 12:15:10    |
      From: tnp@invalid.invalid              On 07/02/2026 02:59, c186282 wrote:       > On 2/6/26 20:12, Lawrence D’Oliveiro wrote:       >> On Fri, 6 Feb 2026 22:32:14 +0000, Pancho wrote:       >>       >>> I was assuming the hardware stack was more than just a register, and       >>> memory. i.e. I assumed there were specific pop/push instructions       >>> which were optimised to get data and adjust a register stack pointer       >>> as a single instruction.       >>       >> Some common architectures have no hardware stack: the stack convention       >> comes purely from the software ABI. E.g. POWER/PowerPC.       >>       >>> So there would be a performance hit in a software stack where       >>> multiple instructions would be needed.       >>       >> I remember, back in the days of the VAX, which was the classic machine       >> with the “kitchen-sink” instruction set in the 1980s -- an instruction       >> for just about everything, including pushing and popping stack       >> elements. You could save the lowest 6 general-purpose registers with       >> just one PUSHR instruction (2 bytes), or you could do it with 6       >> separate PUSHL instructions (2 × 6 = 12 bytes). Guess which was       >> faster?       >       > The TMS-9900 had a couple of similar instructions       > so you could shove ALL the registers onto a stack       > before branching or whatever. Odd chip - sort of       > a hardware solution to multiple users.       >       Yes indeed. A context switch was enormously efficient.              It wasn't so much (IIRC) a question of having all the registers pushed       into a stack so much as not having registers in the first place - these       being instead locations in memory pointed to by a master register, which       you could change and thereby have a completely new context.       Thus general instructions were slow, but context switches were       blindingly fast. a real minicomputer architecture              I may be wrong about that., Its been a long time.              --       “It is not the truth of Marxism that explains the willingness of       intellectuals to believe it, but the power that it confers on       intellectuals, in their attempts to control the world. And since...it is       futile to reason someone out of a thing that he was not reasoned into,       we can conclude that Marxism owes its remarkable power to survive every       criticism to the fact that it is not a truth-directed but a       power-directed system of thought.”       Sir Roger Scruton              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca