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 TAA15427; Sat, 28 Aug 2004 19:02:53 +0200 (MET DST) 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 TAA16834; Sat, 28 Aug 2004 19:02:52 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from postfix3-2.free.fr (postfix3-2.free.fr [213.228.0.169]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i7SH2p5B012105; Sat, 28 Aug 2004 19:02:52 +0200 Received: from warp (chateaudeau-4-82-225-176-25.fbx.proxad.net [82.225.176.25]) by postfix3-2.free.fr (Postfix) with SMTP id 1C01CC11D; Sat, 28 Aug 2004 20:58:17 +0200 (CEST) Message-ID: <003f01c48d20$fa1497e0$0100a8c0@warp> From: "Nicolas Cannasse" To: , "Basile Starynkevitch [local]" References: <004f01c48c19$9950d8e0$0100a8c0@warp> <412F9059.2080808@orcaware.com> <20040827221801.GB1545@annexia.org> <20040828.083835.21913928.yoriyuki@mbg.ocn.ne.jp> <20040828164012.GA6420@bourg.inria.fr> Subject: [Caml-list] (GC issues) Alternative Bytecodes for OCaml Date: Sat, 28 Aug 2004 19:03:44 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Miltered: at concorde with ID 4130BABB.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cannasse:01 warplayer:01 bytecodes:01 opaque:01 chunks:01 vtables:01 setter:01 runtime:01 immutable:01 closures:01 slower:01 generational:01 basile:01 benches:01 garbaged:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Unfortunately, Parrot http://www.parrotcode.org/docs/intro.html > implement all structured objects as PMCs, which are opaque data chunks > on which all operations goes thru a table of functions (similar to C++ > vtables). So, using PMCs for tuple implementations would require an > indirect call (even with Parrot JIT technology) for every basic tuple > operations (ie allocation, tag fetching, field fetching). Also, I am > not sure that Parrot has terminal (tail recursive) calls which are > essential to Ocaml (and other functional languages). That's the kind of things I was thinking when talking about object oriented VM . In the OO world, everything is an object and people tends to abstract everything - even fields, so pure efficient data structures are not available anymore, only through expensive getter/setter and/or field lookup. A functionnal VM typicaly need both : efficient direct access data structures and objects with runtime lookup. [...] > Alos, note that Ocaml (and other functional languages) need a > performant garbage collector (because immutable tuples and closures > are allocated and accessed a lot), and that conservative GCs (à la > Boehm) have lots of interesting features (in particular, > conservativeness which makes then C-friendly, and multithreading), but > are slower than naive generational copying precise GC (see > http://starynkevitch.net/Basile/qishintro.html for some benches). I would like to get your thoughs about the following, since you already wrote a GC as well as OCamlJIT. IMHO, having an any way to interface with C is a key feature for any language. Because the OCaml GC is not scanning the C stack, it is needed to use a lot of macros to take care that newly allocated blocks are not garbaged. What would be the cost of extending the OCaml GC with a C stack scanning pass ? Would it be costly/unsafe to move the pointers on the C stack ? What kind of speed factor can you loose when using for example Boehm GC in OCaml VM instead of OCaml GC ? Which would be better of theses two ? * a conservative GC everywhere (Boehm GC for example) * OCaml GC but with all C allocations made directly into the old generation (for conservativness) I'm also of course interested in Damien thoughts about theses questions. Nicolas Cannasse ------------------- 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