Linked by Christopher W. Cowell-Shah on Thu 8th Jan 2004 19:33 UTC
Permalink for comment
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
News
Linked by Thom Holwerda on 05/18/13 21:06 UTC
Linked by Thom Holwerda on 05/18/13 7:37 UTC
Linked by fran on 05/18/13 1:38 UTC
Linked by Thom Holwerda on 05/17/13 23:35 UTC, submitted by kragil
Linked by MOS6510 on 05/17/13 22:22 UTC
Linked by Thom Holwerda on 05/17/13 22:15 UTC, submitted by Tom
Linked by Thom Holwerda on 05/16/13 21:41 UTC
Linked by Thom Holwerda on 05/16/13 17:04 UTC
Linked by Thom Holwerda on 05/16/13 13:17 UTC
Linked by Thom Holwerda on 05/16/13 12:06 UTC
More News »
Sponsored Links



I think there are a couple of issues surrounding the trig tests in the benchmark.
The first is obvious: all of the computational "heavy lifting" is being done by the run-time library. Performance differences in the code you actually wrote are likely to be unimportant.
The second is that results like this are almost meaningless unless they are accompanied by some measure of the accuracy of the result. Without going into the gory details, functions like sine and cosine are typically calculated from power series approximations. Taking fewer terms is faster, but less accurate. For example, I can write a very fast C routine to approximate the value of pi:
double pi() {
return 3.0 ;
}
The result is correct to one significant figure, after all. ;-)
(Numerical accuracy is not just a theoretical concern. Early versions of Lotus 1-2-3 implemented calculation of standard deviation wrong, and consequently got the wrong answer for the set of numbers {999999, 1000000, 1000001}.)