[Kstars-devel] SkyMap surprise (Quaternions are not used in fact )

Khudyakov Alexey alexey.skladnoy at gmail.com
Tue Nov 10 18:40:35 CET 2009


В сообщении от Вторник 10 ноября 2009 19:09:14 автор Akarsh Simha написал:
> On Fri, Nov 06, 2009 at 01:23:20PM +0300, Alexey Khudyakov wrote:
> > ?? ?????????????????? ???? 06 ???????????? 2009 01:31:49 Médéric Boquien 
??????????????:
> > > The better solution would probably go quaternions all the way. They
> > > should be significantly faster than the current method. I guess this is
> > > a remnant of a first attempt that has never been completed. But that's
> > > a lot of work. So in the meantime it is probably a waste, indeed.
> 
> Sadly, I don't know enough to pitch in here. If it leads in an
> improvement in time as shown by profiling, why not?
> 

IMO if it could be only used in toScreen it won't pay off. It slows down 
SkyPoint increase memory consumption and make code more difficult to understand.
In best circumstances we could win at most few percents.

From things I could remember about quaternions (not really much) they could be 
used in other places and both improve speed and code readability. I'm not sure 
though.

So we should left them as they are for some time.


Here result of profiling with maximal star density (main toScreen user):

* SkyMap::toScreen eats about 10% of drawing time 

* In SkyMap::toScreen ~50% of time is spent in various Options::* calls. 
 So optimization of Options is viable option (in theory). Also there is no
 really much room for speed improvement with quaternions.

* Relativistic corrections are quite costly when compared to other correction 
   - SkyPoint::bendlight - 11.77% 
     Could be easily optimized to ~8%
   - SkyPoint::nutate  - 5.79%
   - SkyPoint::precess - 5.66%
   - SkyPoint::aberrate - 4.95%


More information about the Kstars-devel mailing list