At 06:06 PM 11/7/2001 -0500, Ken Fox wrote:
>Dan Sugalski wrote:
> > At 04:29 PM 11/7/2001 -0500, James Mastros wrote:
> > > On Wed, Nov 07, 2001 at 10:15:07AM -0500, Ken Fox wrote:
> > > > If Perl can keep the loop index in an integer register, then Parrot
> > > > could use fast loop ops. IMHO there's no point in using fast loop ops
> > > > if taking the length of @vector is expensive.
> > >
> > > Huha?  I don't see what the problem is with keeping the index in an I
> > > register.  The problem is with keeping the _current element_ in an I
> > > register.
> >
> > Yup. Hidden things--loop counters, iterators, stuff like that--can and
> > probably will use the I registers.
>
>If the interfaces between "hidden things" and PMCs are expensive
>then I don't see the point in putting those things in non-PMC
>registers. For example, if a loop index is compared to the
>length of an array, Parrot is going to have to convert the index
>to a PMC so it can be compared to the PMC array length.

No it isn't. It can get the integer length of the array and stuff it in a 
register at the beginning of the loop, or do an integer compare when it 
needs to, depending on the semantics of the loop.


                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to