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 116,375 of 117,927   
   Krishna Myneni to Anton Ertl   
   Re: DLSHIFT and DRSHIFT   
   29 Mar 24 08:12:36   
   
   From: krishna.myneni@ccreweb.org   
      
   On 3/28/24 03:49, Anton Ertl wrote:   
   > Krishna Myneni  writes:   
   >> On 3/27/24 13:46, Anton Ertl wrote:   
   >>> You could point out that the extra cost of the check is only incurred   
   >>> for shifts with non-constant shift amounts, and if you could provide   
   >>> data on the frequency of constant and non-constant shift amounts, this   
   >>> might help convince system implementors.   
   >   
   > Here's some data about the occurences in the Gforth image:   
   >   
   > Non-constant shift amount:   
   > 2 lshift   
   > 1 rshift   
   > 0 arshift   
   >   
   > Constant shift amount:   
   > 18 lit lshift   
   > 41 lit rshift   
   >   0 lit arshift   
   >   
   ...   
      
   Checking the Forth code base which I use, I find ~ 100:1 ratio between   
   uses of constant shift amount to non-constant shifts. The existing   
   instances of non-constant shifts are comparable to yours: two in number   
   theory programs e.g., finding an exact fraction for a floating point   
   number, and one use in the assembler.   
      
   I don't know what to conclude from this other than the kind of   
   application development I have been doing favors one over the other. The   
   large number of constant shifts have to do with defining constants,   
   largely for data acquisition interfaces.   
      
   --   
   Krishna   
      
   --- 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