Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Bug? Printf, %X and negative numbers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: tim@f...
Subject: Re: [Caml-list] Bug? Printf, %X and negative numbers
From: Ville-Pertti Keinonen <will@exomi.com>
>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.

Most blocks are small, so one could make a scheme that fits the number
of pointers into the current block header for small blocks and uses an
extra word for larger blocks.  This would have the desirable side
effect of increasing the limit on the size of arrays.  Code that
accesses inside a block often knows the size of the block it's
accessing, so you can often precompute whether that extra word is
there and avoid taking a branch to decide whether to skip it.

-- 
Tim Freeman                                                  tim@fungible.com
Which is worse: ignorance or apathy? Who knows? Who cares?
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D  7180 76DF FE00 34B1 5C78 

-------------------
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