From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA00002; Mon, 9 Feb 2004 12:54:47 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA00768 for ; Mon, 9 Feb 2004 12:54:46 +0100 (MET) Received: from cantva.canterbury.ac.nz (cantva.canterbury.ac.nz [132.181.2.27]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i19Bsjf28327 for ; Mon, 9 Feb 2004 12:54:45 +0100 (MET) Received: from CONVERSION-A1.it.canterbury.ac.nz by it.canterbury.ac.nz (PMDF V6.2-X17 #30791) id <01L6F288H6LCCA2Z5J@it.canterbury.ac.nz> for caml-list@inria.fr; Tue, 10 Feb 2004 00:54:40 +1300 (NEW ZEALAND DAYLIGHT TIME) Received: from webmail (cantwm.giga.canterbury.ac.nz [132.181.2.26]) by it.canterbury.ac.nz (PMDF V6.2-X17 #30791) with ESMTP id <01L6F2873CAKCDR0VG@it.canterbury.ac.nz> for caml-list@inria.fr; Tue, 10 Feb 2004 00:54:38 +1300 (NEW ZEALAND DAYLIGHT TIME) Date: Tue, 10 Feb 2004 00:54:38 +1300 From: Jason Smith Subject: [Caml-list] compiler implementation of partial applications. To: caml-list@inria.fr Message-id: <4023E9EE@webmail> MIME-version: 1.0 X-Mailer: WebMail (Hydra) SMTP v3.61 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-WebMail-UserID: jns28 X-EXP32-SerialNo: 00002797 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; jns:99 canterbury:99 runtime:01 internals:01 runtime:01 ideally:01 statically:01 ocaml's:01 model:01 thankyou:99 compiler:01 compiler:01 closure:01 polymorphic:01 compile:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi All I'm investigating certain compile time optimizations using type information. One in particular is reducing the runtime costs with calling polymorphic functions. My experience so far has mostly been with the internals of the ghc compiler and a language called Mondrian. The ghc compiler performs a runtime argument count check and generates a special closure called a PAP which consumes the appropriate no. of arguments. Ideally this should be eliminated and appropriate transformations performed statically. In particular I'm looking at how the following simplified example is compiled. f1 = \a -> \b -> a + b; f2 = \a -> + a; map (if (..) then f1 else f2) [1, 2, 3]; I was wondering if you could either, a) point me to some resources which discuss ocaml's compilation model with reference to the above, or b) maybe comment on it urself? Thankyou for your time. Jason. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners