dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Will unrolling an instruction slow down execution ?


From: Rhys Weatherley
Subject: Re: [DotGNU]Will unrolling an instruction slow down execution ?
Date: Wed, 14 May 2003 07:50:02 +1000
User-agent: KMail/1.4.3

On Wednesday 14 May 2003 09:57 am, Gopal V wrote:

>       But to my surprise , the pnetmark stats show that the engine
> had a slight slow down when the CKNULL was unrolled ?. With an old
> rating of 1584 and a new one of 1552.

Weird things like this can happen from time to time.  Jumping back and forth 
between unrolled and non-unrolled code has an overhead.  If you unroll an 
instruction that is between two non-unrolled ones, then things can sometimes 
appear to slow down, not speed up.  It's a delicate balancing act.

The biggest source of slowdown in the engine right now is the overhead of 
method calls, which involve several non-unrolled instructions (call/callvirt, 
set_num_args, ckheight, and cknull).  I've experimented with unrolling these, 
but not enough is gained to make it worth it.

We will have to move to a real JIT coder to reduce the overhead further.  i.e. 
completely change the representation of stack frames.  That's step 3 in the 
"generic unroller, dual coders, real JIT" plan.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]