Dan Sugalski wrote:
> 
> On Thu, 10 Aug 2000, David L. Nicol wrote:
> 
> > Two fields.
> >
> 
> This'll cause issues both with GC and thread synchronization. (Besides,
> don't skimp on fields in the base variable structure. Memory's reasonably
> cheap, and shaving a few bytes off isn't worth it anyway)

So what does the working-version perl6 base SV type look like currently?

This may already be happening but here's an optimization: use some space
in the base variable which would be used for something else in an
unsual type of object for the first few characters of a string, for faster
comparisons.




> > THE DEFINED TYPE TABLE:
> >
> > this is where the jump tables live, rather than in the objects
> > themselves, so we don't have "heaviness" of C++ virtuals.
> 
> Since the vtable takes all of a single pointer in the variables, I'm not
> really sure it qualifies as heavy :)

Yes.  I somehow thought that a vbl would have to be in some special place
in memory, I think I got "page tables" confused in there or something like
that.  About "heaviness" I believe that in C++, objects with virtual methods
do drag their vtables around with them at all times rather than having
all objects of each type refer to a table elsewhere. The idea AIUI is, a vtbl
that is less than 100b away from the data is in the cache already, so it
is a less expensive indirection than a table that is else where.


 
> Also, doing this means both more bookkeeping and it makes it somewhat more
> difficult to put together custom vtables. (Not much more, but a little)
> Also, acces via pointer indirection's often faster than an array index
> indirection. (And sometimes not, of course)
> 
> If you want to throw together an RFC, though, go for it.
> 
>                                 Dan

No, there's no win to having vtables be centrally catalogued.  What I'm
concerned with is being able to optimize the table lookups out of the
subroutine calls by replacing them with direct jumps when appropriate, and
if the tables are disciplined or amorphous doesn't affect our ability to
do that any.


I want to be able to say 

perl -o textmanipulationroutines.o texmanipulationroutines.pm

and get something I can link into my C program, however we get there.



-- 
                          David Nicol 816.235.1187 [EMAIL PROTECTED]
:wq

Reply via email to