On Saturday 06 October 2001 02:04 am, Gibbs Tanton - tgibbs wrote:
> I think that changing from a function based implementation to a switch
> based implementation will help on many platforms.  Someone did a patch on
> that, maybe we could update it and commit it.  Having to go through two
> indirections and two array accesses to access a register probably doesn't
> help much either, although it won't be easy to get around that.  Apart
> from that, there is not much else to be done.  We can reprofile, but the
> only thing being executed are integer additions and comparisons...you
> can't get much more basic than that...and you are right, we are running
> much too slowly.

I don't know.  I think the loop may actually be too tight, which a switch 
won't necessarily help.  But I'm all for reducing the overhead of 
unnecessary function calls.  That's my project for the weekend.  (Well, that 
and the summary.)  As far as the double indirection, I moved one out of the 
loop and it actually slowed down.  Just an hour ago, I experimented with 
having each function return the offset (vice the address) of the next 
opcode, in hopes that that might help with some performance within the loop. 
(Since the compiler can then guess that you may be doing pointer arithmetic 
around the address you previously had, vice having to dereference some 
random pointer.  Or so the theory goes. But that also slowed things down.)-: 
 


-- 
Bryan C. Warnock
[EMAIL PROTECTED]

Reply via email to