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 RAA09812; Wed, 7 Jul 2004 17:07:26 +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 RAA09664 for ; Wed, 7 Jul 2004 17:07:25 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from jacquard.numericable.net (jacquard.numericable.net [80.236.0.148]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i67F7OSH029892 for ; Wed, 7 Jul 2004 17:07:24 +0200 Received: (qmail 900 invoked from network); 7 Jul 2004 15:07:24 -0000 Received: from unknown (HELO laposte.net) ([81.220.100.229]) (envelope-sender ) by jacquard.numericable.net (qmail-ldap-1.03) with SMTP for ; 7 Jul 2004 15:07:24 -0000 Message-ID: <40EC122C.3040300@laposte.net> Date: Wed, 07 Jul 2004 17:09:32 +0200 From: =?ISO-8859-1?Q?Olivier_P=E9r=E8s?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040206 X-Accept-Language: br, fr-fr, fr, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Does Caml have slow arithmetics ? References: <20040707091308.GA26172@bourg.inria.fr> <20040707130016.GA27591@bourg.inria.fr> In-Reply-To: <20040707130016.GA27591@bourg.inria.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40EC11AC.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 arithmetics:01 basile:01 tagging:01 pointers:01 pointers:01 word-aligned:01 caml:01 olivier:02 olivier:02 pointer:03 pointer:03 string:03 heap:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Basile Starynkevitch [local] wrote: > If you want to start a functional language implementation from > scratch, you might (as Xavier Leroy told me) consider tagging integers > with a 0 LSB, and having GC-ed pointers with a 1 LSB. Hence, ordinary > C pointers (outside your heap) are handled as integers and remain > untouched by the GC. This insight is Xavier's, not mine! But there is no way to be sure that a pointer you got from C is word-aligned. Consider, for example, a smart user sending you a string with the first character chopped off : this pointer has an odd LSB. And C hackers like to do that kind of things. Xavier Leroy obviously knows this, so I must have missed something. Olivier. ------------------- 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