To put what I described in perspective, if tiling the tree as 256 nodes / tile 
is performed, byte-aligned compression would reduce out_of_line by a magnitude: 

fieldValidity: 6b (which following fields speculated correctly)
parent_node: 1B  (speculate in same block, show relative offset)
first_child: 1B (speculate in same block, show relative offset)
last_child: 1B (speculate in same block, show relative offset)
next_sibling: 1b (yes/no, assume adjacent)
prev_sibling: 1b (yes/no, assume adjacent)
owner_doc: 0b (speculate same as tile)

9B+3b  => 10X smaller for the typical case.

- Leo


> The layout of out_of_line is as follows:
> parent_node: 16 bytes
> first_child: 16 bytes
> last_child: 16 bytes
> next_sibling: 16 bytes
> prev_sibling: 16 bytes
> owner_doc: 16 bytes
> 
> It's totally possible for rearrange stuff. I just chose the simplest, 
> consistent arrangement for convenience's sake.
> 
> 
> ------------------------------
> 
> Message: 6
> Date: Thu, 25 Jul 2013 10:06:50 -0600
> From: Jack Moffitt <[email protected]>
> To: Josh Matthews <[email protected]>
> Cc: [email protected]
> Subject: Re: [dev-servo] Inline DOM storage progress report
> Message-ID:
>       <CAP7VpsWQZPamxP7Lwuc3_4TFs5TopYGGgCrsXiS2tciWwd=g...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
>>> That's what I thought.  16 words is 128 bytes, right?  If each "pointer"
>>> member is effectively two words because of the COW stuff, that still
>>> means we should be able to fit in 6 or so of them plus a few other
>>> bits... What does the memory layout of a Node look like in our setup
>>> right now?
> 
> We should assume that Option<AbstractNode> will be 1 word. It will
> need a bit of a compiler change, but Patrick and Brian seemed to think
> it should be easy to do. If it affects the work you're doing much
> (seems like it will) then we should lobby for the work to be done
> soon.
> 
> jack.
> 
> 
> ------------------------------
> 
> _______________________________________________
> dev-servo mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-servo
> 
> 
> End of dev-servo Digest, Vol 17, Issue 17
> *****************************************

_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to