Peter Jeremy wrote:
> On 2001-Jan-27 00:33:23 -0800, Root Dude <[EMAIL PROTECTED]> wrote:
> >I've broken the proc structure into 4 structures.
> Leaving aside the issue of whether or your efforts were a waste of time,
> I have some comments on the ordering of fields.  Since the fields are
> being re-arranged anyway, I'd like to suggest that the implementation
> characteristics be taken into account.  I'm mainly thinking of padding
> between fields here.
> A second, far less important issue is the interaction between field
> order and code size on the IA32.  Given that most structure references
> are base+offset, there's an extra 3-byte overhead in accessing fields
> more than 127 bytes from the pointer - there's no direct speed penalty
> except on the 80386, but there is an indirect penalty for larger code
> (ie bigger cache footprint).  This suggests that fields with a high
> static reference count should be towards the front of structures.

to counter this, it has been reported that puting fields elsewher 
can reduce cache thrashing as most structures have the important 
fields at the front. It's hard to know which effect would be 
greater.. :-)

> Peter

      __--_|\  Julian Elischer
     /       \ [EMAIL PROTECTED]
    (   OZ    ) World tour 2000-2001
---> X_.---._/  

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to