[Haskell-cafe] Compile-time v run-time

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Fri Aug 17 05:11:05 EDT 2007

I wrote:
> the compile-time/run-time dichotomy is only relevant when a
> value depends on data only available at run-time.

Something I've wanted to experiment with for a long time and
never got round to is writing CAFs back to the load module
at the end of a run (if they're small enough or took a long
time to evaluate).  Has anyone tried this? (It would have a
jolly entertaining effect on benchmark pages!).

The logical extension of this would be that compiling a
programme did the typechecking and then just wrote the
binary equivalent of 'evaluate $ code-generate "...lambda
expressions from programme text..."' into the load-module.
If you never run the programme, this would be quicker. If
you only run the programme once, it would take about the
same time, and running it several times would be quicker --
very much so if it didn't depend on any run-time data.

Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk

More information about the Haskell-Cafe mailing list