LZ4 decompression at CTFE

Dmitry Olshansky via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Apr 28 11:36:08 PDT 2016


On 28-Apr-2016 21:31, deadalnix wrote:
> On Thursday, 28 April 2016 at 17:58:50 UTC, Stefan Koch wrote:
>> On Thursday, 28 April 2016 at 17:29:05 UTC, Dmitry Olshansky wrote:
>>>
>>> What's the benefit? I mean after CTFE-decompression they are going to
>>> add weight to the binary as much as decompressed files.
>>>
>>> Compression on the other hand might be helpful to avoid
>>> precompressing everything beforehand.
>>
>> The compiler can load files faster, that are being used by ctfe only.
>> Which would be stripped out by the linker later.
>> And keep in mind that it also works at runtime.
>>
>> Memory is scarce at compiletime and this can help reducing the memory
>> requirements. When a bit of structure is added on top.
>
> Considering the speed and memory consumption of CTFE, I'd bet on the
> exact reverse.

Yeah, the whole CTFE to save compile-time memory sounds like a bad joke 
to me;)
>
> Also, the damn thing is allocation in a loop.
>


-- 
Dmitry Olshansky


More information about the Digitalmars-d-announce mailing list