Prime sieve language race
SealabJaster
sealabjaster at gmail.com
Tue Jul 13 22:11:34 UTC 2021
On Tuesday, 13 July 2021 at 21:02:55 UTC, SealabJaster wrote:
> Because the second solution has some compile-time things going
> on, it's doing a fair amount less work: not needing to allocate
> the list of sieve sizes; `validateResults` not needing to do a
> lookup; one less level of indirection because it uses a static
> array; etc.
Some corrections:
> not needing to allocate the list of sieve sizes
This actually doesn't matter since there's no need to do so until
the primes are calculated, so time taken doesn't need to be
measured.
> `validateResults` not needing to do a lookup
This function isn't part of the measurement either.
More information about the Digitalmars-d
mailing list