Ops Review
Geoffrey Broadwell
geoff at broadwell.org
Tue Jan 20 23:03:57 UTC 2009
On Tue, 2009-01-20 at 14:22 -0800, Allison Randal wrote:
> Geoffrey Broadwell wrote:
> >
> > One somewhat non-obvious point here -- as the primitive operation for
> > profiling, retrieving the current time with high resolution should be as
> > fast an operation as possible. In addition, it should preferably take
> > near-constant time, so care should be taken to avoid any operations that
> > may vary in run time.
> >
> > My assumption was that the fastest possible thing in PIR was a JITable
> > op -- is that not still the case?
>
> In theory, PIR subroutines can be JIT'd too. In practice, the majority
> of ops are not currently JIT'd.
>
> Either way, JIT-ability shouldn't be the primary concern in choosing
> whether to make something an op. The primary question is whether the
> functionality is so common and/or low-level that it should be part of
> the fundamental "built-in" instructions of the virtual machine.
Fair enough.
OK, I argue that getting the current time at high resolution (preferably
microsecond or better) is both sufficiently common and definitely low
level. (On some processors, a high-res timestamp can be fetched with a
single instruction.)
-'f
More information about the parrot-dev
mailing list