staticIota is easy
Stefan Koch via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Dec 9 17:34:40 PST 2016
On Friday, 9 December 2016 at 18:52:59 UTC, Ali Çehreli wrote:
> I thought I needed something like staticIota in a unittest to
> effect static foreach over a number range and I found one in
> druntime's implementation:
>
>
> https://github.com/dlang/druntime/blob/master/src/core/internal/traits.d#L106
>
> (I wonder why that one is implemented in divide-and-conquer
> fashion. Perhaps due to faster compilation that way?)
>
Yes it is.
n log n
instead of n^2
More information about the Digitalmars-d-learn
mailing list