[racket-dev] Surprising timings for loading Typed Racket

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Thu Jul 12 11:15:58 EDT 2012

I'm trying to reduce the startup overhead imposed by Typed Racket, and
I'm running into a mystifying problem

If you look here at https://gist.github.com/3098628 you'll see two
small files, `tnull.rkt` and `rlnull.rkt`.  The former is an empty
file written in `typed/racket/base`.  The latter is an attempt to
generate exactly the same expanded program manually.  I've also
included the decompiled output for both files, which appears to show
that everything in the compilation of `tnull` is in the compilation of
`rlnull` (`rlnull` has a few *more* explicit requires, equalizing this
has no effect).

However, as the transcript shows, just running the `tnull.rkt` file
takes about 1/3 longer than running `rnull.rkt`.  Is there an obvious
reason for this, and can I affect it?  Could the actual difference be
made clear in the decompiler output?

As an aside, the `(require "here.rkt")` idiom for `(module* name #f
...)` in the decompiler output was pretty confusing the first time I
saw it.
sam th
samth at ccs.neu.edu

Posted on the dev mailing list.