Today I added a tool for TGE (compilers/tge/tgc.pir
) that outputs the compiled grammars as PIR files so they can be pre-compiled to bytecode. I also updated Punie to use it. It's a small optimization, but it doubles the speed of the Punie test suite.
Before: Files=19, Tests=55, 48 wallclock secs (28.47 cusr + 5.01 csys = 33.48 CPU)
After: Files=19, Tests=55, 26 wallclock secs (11.48 cusr + 4.53 csys = 16.01 CPU)
I've been putting off this addition on the general principle of avoiding premature optimizations, but now that TGE has other users (APL, Scheme, and another one soon) I feel more responsible to develop features as they request them.