Very cool! Perhaps we should add this to tools/ ?
Note btw that we already reorder functions, we put the biggest ones first (this helps reduce parallel AOT compilation times by reducing the chance of a core being idle). Might be worth keeping the order as close as possible to the original, while doing your optimization. - Alon On Thu, Jul 17, 2014 at 7:42 PM, Ryan Kelly <[email protected]> wrote: > > Hi All, > > > I've just written up a little experiment I did to improve the compressed > file size of PyPy.js: > > https://rfk.id.au/blog/entry/cromulate-improve-compressibility/ > > The basic idea was to re-order the code for function definitions so that > similar functions are closer together, and hence likely to compress > better. For such a naive trick it was surprisingly effective - around a > 10% decrease in compressed file size for my (admittedly very large and > bloated) use case. > > If anyone else feels like taking it for a spin, I'd be curious to hear > whether and how well it works on other emscriptenized codebases. > > > Cheers, > > Ryan > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
