Need a Faster Compressor
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 23 16:02:22 PDT 2016
On 5/23/2016 2:17 PM, Timon Gehr wrote:
> Then don't do that. I.e. re-mangle recursively from scratch for each mangled
> name and allow sharing parts between unrelated components within that mangled
> name.
How is that essentially different from running a compression pass? The only real
problem with the compressor was the compression speed, and the LZ4 test shows
this is solvable.
> (That's similar to how the compiler stores the structure in memory, which
> also avoids the exponential blowup.)
No, it doesn't.
> You can't have exponential growth before compression.
The compiler is designed so that the internal names are pretty much write-only,
uniquely hashed by their address. It's not spending time running strlen()'s on them.
> Any scheme that does not prevent running time exponential in template instantiation depth is also
> inadequate in the long run.
Most algorithms seem to have pathological worst cases, but as long as they are
rare, it doesn't impede their utility.
More information about the Digitalmars-d
mailing list