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

Khudyakov Alexey alexey.skladnoy at gmail.com
Tue Nov 10 20:36:17 CET 2009


> 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.
> 
After further examination of profiling results I can say that quaternions could 
not lead to significant perfomance improvements. 

SkyMap::toScreen takes ~10% of drawing time. Half of this time is subject to 
optimization with quaternions. Let's say they could give 2-fold win which 
means ~2.5% reduction of execution time. However overhead of keeping 
quaternion in sync is ~2.5% too.

This means that quaternions should be used if and only if they lead to more 
clean and concise code.


More information about the Kstars-devel mailing list