Make EquatorialToHorizontal faster by a number of improvements
1. Cache trigonometric values for RA, Dec and RA0, Dec0 Warning: This might negatively affect performance of updateCoords(), which is another MAJOR bottleneck in KStars 2. Avoid calling sincos() on HourAngle -- instead just compute it using CachingDms subtraction operator. 3. Avoid cos( AltRad ) computation. Instead use cos x = sqrt(1 - sin(x)^2) The result is an improvement of EquatorialToHorizontal() average run-time from ~ 567 ns to ~ 341 ns per call. Note: I would have expected a more significant improvement, but it might be improved once we remove profiling instrumentation from dms and CachingDms.
parent
69caa284
Please register or sign in to comment