[m-dev.] For review: base_type_functors
Peter Schachte
pets at cs.mu.oz.au
Sun Feb 23 07:10:39 AEDT 1997
On Sat, 22 Feb 1997, Tyson Richard DOWD wrote:
> > > +% Tag 1 - SIMPLE Word = pointer to simple vector
> > > +%
> > > +% SIMPLE: Simple vector contains
> > > +% - the arity of the functor (N)
> > > +% - N pointers to pseudo-typeinfos (of each argument),
> > > +% - a pointer to a string containing the name of this
> > > +% functor.
> > > +% - A word containing a representation of the primary and
> > > +% secondary tags of this functor
> >
> > It would probably make accessing the functor name and the functor tags
> > representation easier, and slightly more efficient, if the
> > variable-size part (the N pointers to pseudo-typeinfos) of this
> > simple vector were at the end, rather than in the middle.
>
> Yes, it would, but it would make accessing the pseduo-typeinfos
> less efficient (they're more likely to cause a cache miss, and if
> you don't need the functor and tags, you're carrying a lot of baggage
> in your cache).
What if you put the less important stuff at the very beginning of the data
structure? Then accesses will usually fall in just as small a range as if
they're at the very end. Wouldn't that achieve the same result, while
still keeping the access to the fixed fields simple?
-Peter Schachte URL: http://www.cs.mu.oz.au/~pets/
pets at cs.mu.OZ.AU PGP: finger pets at 128.250.37.150 for key
[A computer is] like an Old Testament god, with a lot of rules
and no mercy. -- Joseph Campbell
More information about the developers
mailing list