home bbs files messages ]

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

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

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

   Message 242,078 of 243,242   
   Michael S to David Brown   
   Re: _BitInt(N)   
   24 Nov 25 13:44:41   
   
   From: already5chosen@yahoo.com   
      
   On Mon, 24 Nov 2025 12:17:58 +0100   
   David Brown  wrote:   
   >   
   > The proposal is not about saving /memory/.  It specifically says that   
   > a _BitInt(N) has the same size and alignment as the smallest basic   
   > type that can contain it, until you get to N greater than 64-bit, in   
   > which they are contained in an array of int64_t.  (The reality is a   
   > little more formal, to handle targets that have other sizes of their   
   > basic types.)   
   >   
      
   That is a bit unfortunate.   
   Compiler support for arrays of 17 to 24bit numbers packed as 3 octet   
   per item would have been handy. And not hard at all for compiler to   
   implement, at least on architectures that has proper support for   
   unaligned access, like x86, POWER, Arm and RISC-V.   
      
   I certainly have real-world applications that use packed arrays like   
   that. They could have been written in cleaner and less error-prone   
   way if such feature was available.   
      
   I suppose, packed numeric arrays with 5, 6 or 7 octets per item are also   
   used by some people, although they are probably less common than my   
   case.   
      
   --- 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