alexferrer / xplane_thermals

Xplane plugin to generate more realistic thermals
GNU General Public License v2.0
28 stars 7 forks source link

Small performance improvement #25

Closed uhertlein closed 5 years ago

uhertlein commented 8 years ago

This commit implements a small performance improvement (~18%) by comparing square distances, thus avoiding the sqrt calculation.

It also removes the artificial limit of 900 generated thermals. It should be limited by the user interface instead.

alexferrer commented 8 years ago

Speed wise, comparing distance squares is faster, but the complexity of the code goes up.

For the type of computer power we need to run X Plane to begin with and at this early point of the plugging life, optimising at the cost of readability IMHO is not yet worth it.

Removing the 900 limit is good though..

Alex.