On Saturday, 21 May 2016 at 21:12:15 UTC, Walter Bright wrote:
The current one is effective, but slow:
https://github.com/dlang/dmd/blob/master/src/backend/compress.c
Anyone want to make a stab at making it faster? Changing the
format is fair game, as well as down and dirty assembler if
that's what it takes.
So really, how good are you at fast code?
A quick search led to this SO thread:
https://stackoverflow.com/questions/1138345/an-efficient-compression-algorithm-for-short-text-strings
It links to SMAZ:
https://github.com/antirez/smaz
It uses a codebook primed for english text. Since this is for
name mangling, priming for Phobos might be a good idea. E.g. put
"std.", "core.", "etc." into the codebook.