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 MAA13824; Sun, 29 Aug 2004 12:11:13 +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 MAA14612; Sun, 29 Aug 2004 12:11:12 +0200 (MET DST) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i7TABB2r002978; Sun, 29 Aug 2004 12:11:12 +0200 Received: from warp (chateaudeau-4-82-225-176-25.fbx.proxad.net [82.225.176.25]) by postfix3-1.free.fr (Postfix) with SMTP id 9F3131737F6; Sun, 29 Aug 2004 12:11:11 +0200 (CEST) Message-ID: <005101c48db0$a2da9110$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> <003f01c48d20$fa1497e0$0100a8c0@warp> <20040828204554.GA9252@bourg.inria.fr> Subject: Re: [Caml-list] Re: (GC issues) Alternative Bytecodes for OCaml Date: Sun, 29 Aug 2004 12:12:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 4131ABBF.002 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 caml-list:01 bytecodes:01 allocations:01 allocations:01 allocating:01 pointers:01 triggers:01 coders:01 slower:01 speedup:01 deployed:01 cannasse:01 compilers:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > * OCaml GC but with all C allocations made directly into the old > > generation (for conservativness) > > You still has to tell the (exact) minor collector about these > allocations (ie something like putting them on the store list) - so > you won't gain much in C coding style, and you'll lose in > performance. The result of C primitives is usually a temporary value > (e.g. because C primitives tend to be wrapped by Ocaml code doing > checking and changing C errors into Ocaml exceptions), so you'll > probably better put then in the young generation. Since old generation collection is mostly conservative (compaction taken appart) , allocating *by default* into the old generation and having a C stack scanner could be a good compromise. The cases where the GC would not be 'exact' is when the C code is calling back OCaml code, this might leave several C values on the stack that might be mistaken with GC pointers. Previous stack (before the interpreter loop) would not be scanned, neither C globals so in most of the cases, no C stack would have to be scanned . That leaves open the problem of distinction of C stacks vs OCaml stacks in native mode... For performances issues, still using the CAML* macros and allocation directly into the young generation would still be available. > This interesting discussion triggers another interesting question: > would Ocaml coders still use Ocaml if its implementation was (say) 3 > or 10 times slower than the current implementation? Alternatively, do > people use my OcamlJitRun program which could provide (on several > programs) a speedup of nearly 2 on their bytecode program (which don't > have to be changed neither in their C primitives nor in the byteocde, > hence the Ocaml source code). The applications I'm writting are mainly speed critical (compilers, generators), and deployed on box which does not have OCaml installed. Being able to compile standalone native executables is a great thing and help a lot for deployment. Best Regards, 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