[Kstars-devel] Remove caching from dms (was: KDE/kdeedu/kstars/kstars)

Khudyakov Alexey alexey.skladnoy at gmail.com
Sat Nov 7 20:48:40 CET 2009


В сообщении от 07 ноября 2009 16:31:35 Khudyakov Alexey написал:
> В сообщении от 07 ноября 2009 00:13:21 Alexey Khudyakov написал:
> > SVN commit 1045844 by khudyakov:
> >
> > Remove radian caching from dms. It's not really sensible to
> > cache results of multiplication. It's better to save some space
> 
> Follow up on DMS caching
> 
> Here nice plot showing caching efficiency as function of time. Efficiency
>  is defined as ratio of all cache hits to all cache misses so far. I made
>  two measurements. In 'idle' I simply left KStars running for few minutes.
>  In 'active' I dragged sky around, zoomed in/out.
> 
> Ratio is quite low, it's in 0.5-0.6 range. Or in other words only about 1
>  call in 3 is cached. This leads me to question efficiency of sin/cos
>  caching.
> 
Indeed profiling shows that in case of dms caching is pessimisation. When I 
replaced current caching version of sincos with inlined call to sincos it 
become about 1.5 times faster. So I propose to remove caching.

Also it decrease size of dms to size of double and make it cheap to 
pass/return it by value.


More information about the Kstars-devel mailing list