Policy for exposing range structs

Anon via Digitalmars-d digitalmars-d at puremagic.com
Sat Mar 26 10:42:06 PDT 2016


On Saturday, 26 March 2016 at 05:22:56 UTC, Andrei Alexandrescu 
wrote:
> On 03/25/2016 11:40 AM, Steven Schveighoffer wrote:
>> On 3/25/16 11:07 AM, Andrei Alexandrescu wrote:
>>> On 3/25/16 10:07 AM, Steven Schveighoffer wrote:
>>>>
>>>> We should actually be moving *away from* voldemort types:
>>>>
>>>> https://forum.dlang.org/post/n96k3g$ka5$1@digitalmars.com
>>>>
>>>
>>> Has this bug been submitted? -- Andrei
>>
>> I'm not sure it's a bug that can be fixed. It's caused by the 
>> design of
>> the way template name mangling is included.
>>
>> I can submit a general "enhancement", but I don't know what it 
>> would
>> say? Make template mangling more efficient? :)
>>
>> I suppose having a bug report with a demonstration of why we 
>> should
>> change it is a good thing. I'll add that.
>>
>> -Steve
>
> Compression of template names. -- Andrei

Would literally not help. The problem in the bug report is 
recursive expansion of templates creating mangled name length 
O(2^n) where n is the number of recursive calls. If you compress 
that to an eighth of its size, you get O(2^(n-3)), which isn't 
actually fixing things, as that is still O(2^n). The 
(conceptually) simple change I suggested brings the mangled name 
length down to O(n).

You could compress *that*, but then you are compressing such a 
small amount of data most compression algorithms will cause the 
size to grow, not shrink.


More information about the Digitalmars-d mailing list