[Kst] Hot paths

Barth Netterfield netterfield at astro.utoronto.ca
Fri Dec 17 17:02:36 CET 2004


On Friday 17 December 2004 09:58, George Staikos wrote:
> On Friday 17 December 2004 09:42, Barth Netterfield wrote:
> > Seems to me: Not a lot...
>
>    I figured the same.
>
> > We could in principle get rid of some ifs at the cost of code size and
> > complexity:
> >  -different loop for log and not log (chunk wise XY computation loops
> > with the 'if' outside it)
> >  -let vectors decide in advance if they have nans, different loop if no
> > nans - loose another if. (no help in general, but, if some vector sources
> > like data sources can't ever give nans then we don't have to test.  Or,
> > for, scrolling data, we could cache past answers)
> >  -we could cache X1 and Y1.
> >
> > This is all pretty painful, but could give a 30% speedup in our dreams.
> > We will see a *much* bigger improvement in most cases by not drawing
> > hidden tabs.
>
>    ... for those using multiple tabs.
>
>    Simply removing one or two if() probably won't give much of any speedup
> at all though, I think.  At least not on modern CPUs.

In our dreams it will....



More information about the Kst mailing list