On Sat, Nov 17, 2001 at 02:22:44PM +0000, [EMAIL PROTECTED] wrote:
> Alan Burlison <[EMAIL PROTECTED]> wrote:
> > Dave Mitchell wrote:
> > > * Is there ever any need to for a PMC type which holds both an int and
> > > a
> > > num? In the Perl 5 case we were constrained by code that expected to
> > > always
> > > find an int (or a num) in a fixed slot in the SV; with PMCs, all
> > > access
> > > to these slots is via methods, so an int-num or num-int conversion can
> > > be done on the fly.

If you use the same value enough times in places where you need an integral
value, (an array index, an argument to substr etc), it is faster to cache the
int value than converting from double (or BIGFLOAT) every time.

-- 
Jason

Reply via email to