[racket-dev] Expansion size vs. zo file size

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Tue Nov 11 17:25:37 EST 2014

Hi all,

I'm currently trying to improve Typed Racket's contract generation. I
have a change which improves time/memory usage and also the size of the
expanded code.

The trouble is that despite the decrease in the size of the expanded
code, the resulting zo files are actually *larger*.

I found this unintuitive. Is there anything I can do to get the bytecode
compiler to help me out here?

Here are the numbers:

                         with change  without change
  matrix.rkt expansion |       264K |          524K
  --------------------------------------------------
  matrix.rkt zo file   |      1036K |          820K

If you'd like to try to reproduce this, the branch I'm operating on is
here:
  https://github.com/takikawa/racket/tree/tr-experimentation-2

I got the expansion size with:
   raco expand matrix.rkt > matrix-expansion
   du matrix-expansion

and just `du compiled/matrix_rkt.zo` for zo file size. This is for
"matrix.rkt" in the math library.

Cheers,
Asumu

Posted on the dev mailing list.