Julian Taylor <jtaylor.debian <at> googlemail.com> writes: > your sin and exp calls are loop invariants, they do not depend on the > loop iterable. > This allows to move the expensive functions out of the loop and only > leave some simple arithmetic in the body.
Ahhhh! I feel extremely stupid for not realising this! Thanks Julian. Any thoughts on why using -ffast-math it actually goes slower for just doing sin(x)? _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
