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,174 of 243,242   
   Waldek Hebisch to Keith Thompson   
   Re: _BitInt(N)   
   27 Nov 25 02:54:41   
   
   From: antispam@fricas.org   
      
   Keith Thompson  wrote:   
   >   
   > Here's an idea.  Rather than asserting that _BitInt(1'000'000)   
   > is silly and obviously useless, try *asking* how it's useful.   
   > I personally don't know what I'd do with a million-bit integer,   
   > but maybe somebody out there has a valid use for it.  Meanwhile,   
   > its existence doesn't bother me.   
   >   
   > My guess is that once you've implemented integers wider than 128   
   > or 256 bits, million-bit integers aren't much extra effort.   
      
   Actually critical thing is support for sizes between 256 and 1024,   
   here good inline code can be nontrivially faster than than   
   calls to general library.  Once you go above 1024 mutiplication   
   is costly enough so that other thing do not make much difference.   
   But ambitious implementation may try to gain due to known size   
   also for somewhat bigger sizes, so low limit would be unnatural.   
      
   IIUC currently for RSA modulus having about 3000 bits is   
   recomended setting, but switch to 4000 bits is likely in   
   near future.  Actual arithmetic in RSA need double number   
   of bits compared to modulus, so to properly support RSA   
   implementation should have limit 8192 or bigger.  So, it   
   looks that gcc has limit choosen just to support important   
   applications like RSA.   
      
   For million bit integers one wants FFT multiplication, for   
   sizes available in gcc one could use slightly simpler   
   methods which are faster than FFT in intermediate range.   
   Of course, one can call 'mpn' routines from GMP, so such   
   multiplication is just a function call, unless implementor   
   does not want to use GMP.   
      
   --   
                                 Waldek Hebisch   
      
   --- 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