Bob, Malcolm,
Thanks so much for the feedback.
Since I have access to all three platforms, I ran a benchmark on Mac OSX,
Windows, and Linux, to compare the speed of the the two implementations.
Each test performed 900,000 complex multiplications. The results are as
follows:
Platform | CPU | 4 mult/2 add | 3 mult/5 add
-----------+------------+--------------+-------------
Mac OSX | G5, 1.8GHz | 33.5 sec | 33.7 sec
Linux | P4, 3.0GHz | 20.0 sec | 20.2 sec
Windows XP | P4, 3.8GHz | 44.8 sec | 45.0 sec
The standard method is marginally faster than the method with one less
multiplication. There is almost no difference. It is interesting to note
that the Windows machine, which has the fastest CPU, was slower than the
other machines.
Since rounding errors could become an issue for large numbers when
subtracting floating point numbers (or when one number is large compared to
the other when adding floating point numbers), keeping the number of
operations as low as possible should minimize such errors. Hence, I decided
to stick with the current implementation.
Thanks again for the feedback, and cheers,
Roger
Roger,
That's useful information. I need to revisit my plugin.
Bob
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>