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

2014-11-14 Thread Asumu Takikawa
On 2014-11-11 17:25:37 -0500, Asumu Takikawa wrote:
> I found this unintuitive. Is there anything I can do to get the bytecode
> compiler to help me out here?

FWIW, I also tried looking at the optimizer logs in both cases to see if
there was much difference. Grepping for "inlining" shows counts of 75
vs. 47 for compiling matrix.rkt (post/pre change and ignoring the
inlining that goes on for modules like '#%util).

So maybe this is just a time/space tradeoff that I can't do much about.

Cheers,
Asumu
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


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

2014-11-11 Thread Asumu Takikawa
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
_
  Racket Developers list:
  http://lists.racket-lang.org/dev