home bbs files messages ]

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,262 of 135,536   
   Lawrence =?iso-8859-13?q?D=FFOlivei to Pancho   
   Re: Memory Safety (Re: Python: A Little    
   07 Feb 26 01:12:30   
   
   From: ldo@nz.invalid   
      
   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?   
      
   --- 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