[Kst] Profiling

George Staikos staikos at kde.org
Wed Jul 16 00:46:03 CEST 2003

On Tuesday 15 July 2003 18:44, Barth Netterfield wrote:
> Hi,
> I've been gprofing kst to see where things are slow....
> kstvector::interpolate() is about 40% if the time (largest single
> subroutine obviously) on my P4.  If I take out the if statements, this
> drops to ~10%.  A single if check (always false or always true) pops it
> back up to 32%.  Sounds like branch prediction on the P4 getting it wrong
> too often.
> -the if's are never true unless there are bugs upstream (I think...)
> -is there any way that you know of to make an if check less expensive on a
> P4?
> Suggestions?

  I just committed a patch.  It may cause assert() failures at times, but it 
didn't on initial tests for me.  We can fix them as they are encountered.  
How does it work for you?  Is it any faster?  I reordered it a bit as well, 
which might result in one fewer if() in a common case.

George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/

More information about the Kst mailing list