3 ms·
The question is why do someone needs the first 50Mi primes in a C++ file
by raverbashing 10y ago
The question is why do someone needs the first 50Mi primes in a C++ file
- JoachimSchipper 10y agoNo idea, but it would be a fairly reasonable way to test a prime-finding algorithm - or to replace a prime-finding algorithm with something less complicated.
- ddorian43 10y agoSee making crc 4x faster in redis by keeping precommputed values in a lookup table: https://matt.sh/redis-crcspeed https://matt.sh/redis-crcspeed Maybe something like that ?
- S4M 10y agocrypto?
- informatimago 10y agoBecause the alternative: generating the primes at compilation time with a template functional expression would be too slow, and quite possibly would explode the compiler's memory limits. (No Turing Machine here), and doing it at run-time or deliverying it as a "resource file" is obviously out of the question.