On May 30, 2006, at 9:01 AM, bulia byak wrote:

As for speed, I noticed you have an operation with a double (sum) in

the innermost loop. I think it might become noticeably faster if you

implement this critical calculation entirely in integers. Can you do


Oh, just be sure to measure performance before and after things like this (and with and without optimization turned on).

With the introduction of the Pentium processor many operations became faster with floating point than with integer. So one needs to actually measure things like this.

(not measuring performance of changes intended to speed things is an easy trap to fall in, but studies have shown that programmer intuition in regards to optimization is wrong the vast majority of the time)