[Kst] Profiling

George Staikos staikos at kde.org
Wed Jul 16 00:33:15 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.

   Ouch.

> -the if's are never true unless there are bugs upstream (I think...)

   Most likely.

> -is there any way that you know of to make an if check less expensive on a
> P4?

   Hmm don't think so. :-)

   It might be possible to refactor some of those if(), and eliminate some 
others.  The problem (I think I added some as well) is that code elsewhere 
was referencing memory beyond the allocated region.  I'm going to put 
assert()s instead and see if I can get rid of some of the checks.
 
-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/



More information about the Kst mailing list