From: Keith.S.Thompson+u@gmail.com   
      
   BGB writes:   
   > On 11/24/2025 8:21 AM, bart wrote:   
   >> On 24/11/2025 13:35, Keith Thompson wrote:   
   >>> bart writes:   
   >>> [...]   
   >>>> There are two kinds of BitInts: those smaller than 64 bits; and those   
   >>>> larger than 64 bits, sometimes /much/ larger.   
   >>>   
   >>> As far as I know, the standard makes no such distinction.   
   >>   
   >> *I* am making the distinction. From an implementation point of view   
   >> (and assuming 64-bit hardware), they are quite different.   
   >> And that leads to different kinds of language features.   
   >   
   > As noted, as I understand it there is no reason for the storage to be   
   > smaller than the next power-of-2 size.   
      
   Really?   
      
   Rounding up to 8, 16, 32, or the next multiple of 64 bits seems   
   reasonable. Rounding 1025 bits up to 2048 does not (and is not   
   the current gcc and llvm/clang implementations do).   
      
   What advantage does rounding 1025 up to 2048 give you over rounding   
   it up to 1088 (17*64)? It seems to me that the only real difference   
   is in how many times a loop has to iterate.   
      
   My understanding is that power-of-two sizes lose their advantages   
   beyond about 64 or 128 bits. Am I mistaken?   
      
   [...]   
      
   --   
   Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com   
   void Void(void) { Void(); } /* The recursive call of the void */   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|