Thread overview | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 12, 2004 [Performance] dmd outperforms gcc C and several others in trigonometric functions | ||||
---|---|---|---|---|
| ||||
Results of a reported Benchmark on a Pentium 4-M, 2 GHz, WinXP Pro SP1: Python/Psyco 13.1 gcc C 14.9 Java 1.3.1 22.1 Python/interpreted 47.1 Java 1.4.2 57.1 My result on a Duron, 700 MHZ, Win98SE: dmd 0.79 9.54 All results in seconds. Details will follow. So long. |
February 12, 2004 Re: [Performance] dmd outperforms gcc C and several others in trigonometric functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | Hmm. Are you sure you are testing the same thing? I find it hard to believe C on a 2GHz machine getting beaten by D on a 700MHz machine. Can you run the D code on the same machine as the others? "Manfred Nowak" <svv1999@hotmail.com> wrote in message news:c0gnum$1ugh$1@digitaldaemon.com... > Results of a reported Benchmark on a Pentium 4-M, 2 GHz, WinXP Pro SP1: > > Python/Psyco 13.1 > gcc C 14.9 > Java 1.3.1 22.1 > Python/interpreted 47.1 > Java 1.4.2 57.1 > > My result on a Duron, 700 MHZ, Win98SE: > > dmd 0.79 9.54 > > All results in seconds. Details will follow. > > So long. > |
February 13, 2004 Re: [Performance] dmd outperforms gcc C and several others in trigonometric functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | Ben Hinkle wrote:
> Hmm. Are you sure you are testing the same thing? I find it hard to believe C on a 2GHz machine getting beaten by D on a 700MHz machine. Can you run the D code on the same machine as the others?
I provisionally checked your complaint:
According to SiSoft Sandras FPU-Benchmark the Pentium4-2GHz has 1480
Whetstone MFLOPS while the Duron-700MHz has 1102.
The reported result for gcc is 14.9s and my result is 19.6s.
The expression (1480/1102) / (19.6/14.9) yields 1.021. So it is close
enough to trust the result for dmd.
Three of the used functions are intrinsic to dmd, one is coded in assembler and only one is from std.c.math.
No, i do not have access to the benchmarking machine. However the author
says:
| I could also extend the range of languages or variants tested.
But wait until you see the other results.
So long.
|
February 13, 2004 Re: [Performance] dmd outperforms gcc C and several others in trigonometric functions - 1 attachment | ||||
---|---|---|---|---|
| ||||
Manfred Nowak wrote:
>
> Now the relative results for gcc and dmd:
>
> int long double trig geometric mean
> Visual C++ 1 1 1 1 1
> gcc C 1.021 1.532 1.484 4.257 1.77
> dmd(est) 1.039 5.691 3.688 2.074 2.59
Looks like D's performance with longs is low across the board, but there's a very important distinction to be made here. VC++ has 32 bit longs and gcc-windows may as well. For an accurate measure on this test, all compilers should have used guranteed 64 bit width types.
Also, since this includes compile-time, I expect that is a factor in D's performance. VC++ is pretty fast but I doubt it could compare to D, even with trivial programs. It would be nice if the performance evaluations split out run time vs. compile time for each test.
Sean
|
February 13, 2004 Re: [Performance] dmd outperforms gcc C and several others in trigonometric functions - 1 attachment | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | Sean Kelly wrote:
>
> Also, since this includes compile-time, I expect that is a factor in D's performance.
It doesn't include-compile-time. My mistake. I misread Mr. Nowak's post.
Sean
|
February 14, 2004 Re: [Performance] dmd outperforms gcc C and several others in trigonometric functions - 1 attachment | ||||
---|---|---|---|---|
| ||||
In article <Xns948F1CC05B07svv1999hotmailcom@127.0.0.1>, Manfred Nowak says... > >Following the benchmark, which can be found under >http://osnews.com/story.php?news_id=5602&page=1 >the benchmark tested five criteria: >integer math, long math, double math, trigonometric functions, file io I should be noted that D's longs are 64 bit. http://www.digitalmars.com/d/index.html |
February 14, 2004 Re: [Performance] dmd outperforms gcc C and several others in trigonometric functions - 1 attachment | ||||
---|---|---|---|---|
| ||||
Posted in reply to Patrick Down | Patrick Down wrote:
> I should be noted that D's longs are 64 bit.
.. and in the benchmark code for C and C++ actually `long long', i.e. 64 bit was used. The sources for the other Compilers can be checked at the submitted adress.
So long.
|
February 14, 2004 Re: [Performance] dmd outperforms gcc C and several others in trigonometric functions - 1 attachment | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | Manfred Nowak wrote:
>
> .. and in the benchmark code for C and C++ actually `long long', i.e. 64
> bit was used. The sources for the other Compilers can be checked at the
> submitted adress.
Teach me to post on a friday evening. I completely missed the second "long" when I looked at the source.
Sean
|
February 14, 2004 Re: [Performance] dmd outperforms gcc C and several others in trigonometric functions - 1 attachment | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | Sean Kelly wrote:
[...]
> VC++ has 32 bit longs and gcc-windows may as well.
A look at the sources would have convinced you, that the computations were actually taken out with `long long' by VC++ and gcc.
There is another issue, I only shortly mentioned: the Pentium 4 has the Intel SSE2 incorporated. To be able to use this raises according to SiSoft Sandra's database the performance in Whetstone from 1480 MFLOPS to 2706 MFLOPS, i.e. a factor of 1.865.
It is very unlikely, that VC++ does not use the SSE2 and gcc, although instructed to use them, seems to have failed.
So long.
|
February 14, 2004 Re: [Performance] dmd outperforms gcc C and several others in trigonometric functions - 1 attachment | ||||
---|---|---|---|---|
| ||||
Manfred Nowak wrote:
> NOTE:
>
> also gcc was adviced in the original benchmark to make use of the SSE2,
> this seemed not to work. Otherwise dmd should even score better
GCC cannot vectorize normal code. But there is a number of GCC-specific intrinsic functions which work on vectors, only they profit from SSE2, SSE, 3DNow and other SIMD extensions.
What i would also like to see is a comparison with DMC. Obviously, D semantics does not contain anything that would cause much lower performance than C on math, but it may be the fault of current front-end or of the used back-end.
-eye
|
Copyright © 1999-2021 by the D Language Foundation