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,609 of 117,927   
   minforth to All   
   Re: 3dup again   
   03 Oct 25 11:09:07   
   
   From: minforth@gmx.net   
      
   Am 03.10.2025 um 11:02 schrieb albert@spenarnc.xs4all.nl:   
   > In article <2025Oct2.224440@mips.complang.tuwien.ac.at>,   
   > Anton Ertl  wrote:   
   >> dxf  writes:   
   >>> For 3DUP I believe this is the one to beat:   
   >>>   
   >>> : 3DUP ( a b c -- a b c a b c )  dup 2over rot ;   
   >>>   
   >>> With NTF/LFX the locals version will break even.   
   >>   
   >> As we already discussed in the thread including   
   >> <2021Sep11.083507@mips.complang.tuwien.ac.at>, NTF/LXF produces the   
   >> same (optimal for the calling convention used by NTF/LXF) code for   
   >> 3DUP versions using the data stack, return stack, or locals.  That's   
   >> because the actual data flow is always the same, and NTF/LXF can see   
   >> this data flow in all three cases.   
   >   
   > The problem with 3DUP is that it is actually used in context.   
   > What is the data that is going to 3DUP ped? In my view this   
   > amounts to double use of data that is in registers (32 in the riscv)   
   > anyway, after an optimiser does his thing.   
   >   
      
   Code inlining will mend it.   
      
   --- 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