Divide & Conquer divides, but doesn't conquer
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon May 25 16:07:06 UTC 2020
On 5/25/20 9:00 AM, Adam D. Ruppe wrote:
> On Monday, 25 May 2020 at 06:18:13 UTC, FeepingCreature wrote:
>> private enum staticMapHelper(size_t length) =
>> staticMapHelperGen!(length);
>
> lol, also called it staticMapHelper when doing this myself!
>
> Solid result though: 2s, 810MB.
>
> I'm kinda surprised it beat the crap out of my mixin version.
>
> Mine was 3s, 1.2G using a mixin expression (alias staticMap =
> mixin(helper()). Changing it to a mixin declaration (the alias is in the
> mixin, like yours) brought it to 2.2s, 924MB. Interesting. And changing
> the helper from a template to a function gives another small win: 2.2s
> but 906MB.
So it seems a mixin-based version + Max's precalculated length = win!
More information about the Digitalmars-d
mailing list