Divide & Conquer divides, but doesn't conquer

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon May 25 16:04:24 UTC 2020


On 5/25/20 3:15 AM, Max Samukha wrote:
> On Monday, 25 May 2020 at 06:18:13 UTC, FeepingCreature wrote:
> 
>> static foreach and stringof were used so I didn't have to pull in 
>> `format` or `to!string`, which had issues in std.meta.
>>
>> I'm seeing some improvement over 2.086 at least; it should be about 
>> equivalent to the hand-unrolled version in master.
> 
> How could you miss the state-of-the-art?) Preallocate the result string 
> and use the string counter hack!
> http://dpldocs.info/this-week-in-d/Blog.Posted_2020_05_11.html#dmd-and-static-foreach 

static foreach is quadratic? Is this a matter of principle, or QoI?



More information about the Digitalmars-d mailing list