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

2007-08-17 Thread Jon Fairbairn
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 [EMAIL PROTECTED]


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2007-08-17 Thread Kim-Ee Yeoh

If RAM was treated as an extension of non-volatile 
storage instead of the other way round, we'd already 
be there.

Put another way, would suspending program to 
disk achieve the same results?


Jon Fairbairn wrote:
 
 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.
 

-- 
View this message in context: 
http://www.nabble.com/Hints-for-Euler-Problem-11-tf4114963.html#a12197690
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe