The smallest executable I can get is about 49mb from nearly 60mb. it's clear that there is no pruning of unused packages, libraries, etc.
I have used the two "old" tricks: use #lang racket/base and the demod trick for another which, combined, result in about an 18% reduction. That's non-trivial, but 49mb is still crazy big. For nim, the same functionality is 75k (for a statically compiled language that competes with c and c++).
I certainly don't expect to match nim or c++, but something around 2mb would be nice. Gambit gets down to 6mb without doing anything special. Chicken gets down to 2.5mb without doing anything special. Clearly, compiling through c makes stuff way smaller. That's not how Racket does it, but there must be something.
For example, the entire repl should be factor out and most of the runtime should be factored out if there are no macros.
Any way to get part way with what's available today? Is there any hope of improving the situation?
On the good side, Racket 8.10 compiled code runs in 1/2 the time of Gambit when being careful about correct typing throughout. My example trivially adds up a 100,000 element homogeneous vector of float64 elements using a loop. Have to be sure to use f64vector specific functions and start with (sum 0.0t0). Fully typed up and down is the way to go and what nim and Julia do because they are very typed languages (Julia lets you be dynamic, but static provides best performance.
Julia is 4x faster than Gambit so that makes Julia 2x faster than Racket. That is an amazing performance. Nim, which is within 5-10% of c++ on simply stuff, using totally unsafe compiler options to match c++ is 12x faster than Racket on this task, which is like totally unfair.
I am very happy with indications of Racket performance when one is careful about types (which is understood--that's a lot of how static languages get fast). I am not so thrilled with the size.
I have to say that while the multi-language thing is more of a novelty for me, you can really see the advantage of having lots of people working on Racket. Improvement is really significant.
I should test "script" through the interpreter. It should be pretty close given the Chez "jit" approach.