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 VAA02188; Tue, 1 Apr 2003 21:16:22 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 VAA08323 for ; Tue, 1 Apr 2003 21:16:20 +0200 (MET DST) Received: from mail.exomi.com (mail.exomi.com [217.169.64.72]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h31JGJ919102 for ; Tue, 1 Apr 2003 21:16:20 +0200 (MET DST) Received: from exomi.com (unknown [10.0.5.5]) by mail.exomi.com (Postfix) with ESMTP id 3C7335D03; Tue, 1 Apr 2003 22:16:19 +0300 (EEST) Date: Tue, 1 Apr 2003 22:16:18 +0300 Subject: Re: [Caml-list] Bug? Printf, %X and negative numbers Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) Cc: To: Brian Hurt From: Ville-Pertti Keinonen In-Reply-To: Message-Id: <6A2DCA04-6476-11D7-848D-000393863F70@exomi.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.551) X-Spam: no; 0.00; caml-list:01 bug:01 printf:01 allocating:01 shifts:01 ors:99 alignment:01 pointers:01 tightly:01 pointer:03 heap:03 optimizing:03 allocated:03 slow:05 suspect:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I was thinking of just a bitmask. You are always allocating into the > minor heap. You just define the low 1/32nd of the minor heap a > bitmask of > what is a pointer and what isn't. This would probably slow down > allocation- not by much, would be my prediction, but it would slow down > allocation. You may gain some of that cost back by not needing to do > the > shifts and ors we currently do to deal with the low bit. I can't > predict > what the overall performance delta would be- not even if it will be > positive or negative. I suspect that would be quite slow, since you have to do one bit operation for each word of each allocation (optimizing them is difficult because you don't know the alignment). One way of doing this much faster is just having a the first word of any mixed block (homogenous blocks aren't a problem) indicate the number of pointers and always put the pointers first. Of course wasting an entire word on this is nasty when less bits would do...but the bits of the current block header are pretty tightly allocated. ------------------- 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