From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA10078 for caml-redistribution; Mon, 15 Sep 1997 08:37:13 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA00167 for ; Sat, 13 Sep 1997 02:37:59 +0200 (MET DST) Received: from antares.utu.fi (antares.utu.fi [130.232.1.2]) by nez-perce.inria.fr (8.8.7/8.8.5) with ESMTP id CAA22543 for ; Sat, 13 Sep 1997 02:37:57 +0200 (MET DST) Received: from Ualfard@localhost (fake: alfard) by utu.fi with UUCP id <33094-22061>; Sat, 13 Sep 1997 03:37:01 +0300 Received: by alfard.utu.fi (4.1/SMI-4.1) id AA05419; Sat, 13 Sep 97 02:57:42 +0300 From: moj@alfard.utu.fi (Matti Jokinen) Message-Id: <9709122357.AA05419@alfard.utu.fi> Subject: Preinitialized executables? To: caml-list@inria.fr Date: Sat, 13 Sep 1997 02:57:41 +0300 (EET DST) X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Sender: weis 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