Pegged and DMD Compilation Memory

Philippe Sigaud philippe.sigaud at gmail.com
Wed May 23 13:45:16 PDT 2012


On Wed, May 23, 2012 at 7:40 PM, d coder <dlang.coder at gmail.com> wrote:
>
>> Have you guys tried to use asModule?
>> https://github.com/PhilippeSigaud/Pegged/wiki/Grammars-as-D-Modules
>
>
> Thanks for the idea. I just gave it a try and the memory came down by about
> 50%. Additionally the compilation became much faster.

I never measured memory when I use asModule, since for me the
compilation time becomes quite small. Even the D grammar (the biggest
I tried with Pegged, about 200 rules, so an order of magnitude bigger
than your grammar) becomes a module in a few seconds, and my computer
is not top of the line.


> But that might still not be enough :-( I will try to simplify my grammar
> rules for now.

Maybe you can try to inline it some? See
https://github.com/PhilippeSigaud/Pegged/wiki/Optimizations


Philippe


More information about the Digitalmars-d mailing list