Version française
Home     About     Download     Resources     Contact us    
Browse thread
Preinitialized executables?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: moj@a...
Subject: Preinitialized executables?
I have a program that needs to be initialied by building a large and
fairly complicated data structure.  In Ocaml the fastest method I
have found is to save the data structure in a file with output_value
and then load it into the program with input_value, but even this way
the overhead is considerable.  SML/NJ has a function named exportFn,
which saves the program together with its state into an executable file:
when the program is run from the file, control is transferred to a
function given as a parameter to exportFn.  I wonder if something
similar is possible in Ocaml.

- Matti Jokinen