home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 117,101 of 117,927   
   Anton Ertl to Anton Ertl   
   Re: Stack vs stackless operation   
   28 Feb 25 21:55:05   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:   
   >anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:   
   >Another variant:   
   >   
   >: exchange ( addr1 addr2 -- )   
   >    dup @ rot !@ swap ! ;   
   >   
   >This uses the primitive   
   >   
   >'!@' ( u1 a-addr -- u2 ) gforth-experimental "store-fetch"   
   >   load U2 from A_ADDR, and store U1 there, as atomic operation   
   >   
   >I worry that the atomic part will result in it being slower than the   
   >versions that do not use !@.   
      
   It's barely noticable on Zen4, but it makes a big difference on the   
   Cortex-A55.  Therefore we decided to also have a nonatomic !@.  We renamed the   
   atomic one into ATOMIC!@ and !@ is now the nonatomic version.   
      
   How do they perform?   
      
   On Zen4:   
         !@          atomic!@   
     821_538_216    880_459_702  cycles   
   3_815_202_629  3_710_937_849  instructions   
      
   On Cortex-A55:   
      !@        atomic!@   
   3355427045  5856496676  cycles   
   3115589778  4318749543  instructions   
      
   - anton   
   --   
   M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html   
        New standard: https://forth-standard.org/   
   EuroForth 2023 proceedings: http://www.euroforth.org/ef23/papers/   
   EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca