digitalmars.D.announce - D has now surpassed C++ in overall performance
- John (2/2) Feb 01 2007 D has now surpassed C++ in overall performance at the "Computer Language...
- Anders Runesson (3/6) Feb 01 2007 Nice. Then again, neither intel nor microsoft's compilers were in the
- Andreas Kochenburger (6/9) Feb 01 2007 The shootout is a fun project. IMO the results depend too much on the
- janderson (6/19) Feb 01 2007 I find the D and C++ the most interesting because the code is almost the...
- janderson (6/9) Feb 01 2007 Only if you take memory into account. CPU performance is still not up
- John (2/15) Feb 01 2007 Yeah, I would really like to see GDC added but they said it would be "to...
- janderson (3/5) Feb 02 2007 Yeah, this would be a better benchmark (never perfect of course) of the
- Georg Wrede (30/48) Feb 04 2007 Now this _is_ to worry about.
- Knud Soerensen (22/35) Feb 02 2007 Well the gcc mandelbrot use sse commands for fast computations
- Walter Bright (3/5) Feb 02 2007 The NRVO has a significant effect, as well as the tail recursion
- janderson (6/12) Feb 02 2007 Great job on the optimizations!
D has now surpassed C++ in overall performance at the "Computer Language Shootout" website. This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC). http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1
Feb 01 2007
John skrev:D has now surpassed C++ in overall performance at the "Computer Language Shootout" website. This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC). http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1Nice. Then again, neither intel nor microsoft's compilers were in the shootout. Would have been interesting to see.
Feb 01 2007
John schrieb:D has now surpassed C++ in overall performance at the "Computer Language Shootout" website. This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC). http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1The shootout is a fun project. IMO the results depend too much on the enthusiasts who participate and continue optimizing algorithms in their favourite language. BigForth and the meteor benchmark is just a recent example. And the expressiveness of a language isn't even a criterion!
Feb 01 2007
Andreas Kochenburger wrote:John schrieb:I find the D and C++ the most interesting because the code is almost the same in most cases (at least in the examples). Of course both languages could implement C versions of the algorithms to get the top level of performance. -JoelD has now surpassed C++ in overall performance at the "Computer Language Shootout" website. This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC). http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnor =1&hello=0&sumcol=1The shootout is a fun project. IMO the results depend too much on the enthusiasts who participate and continue optimizing algorithms in their favourite language. BigForth and the meteor benchmark is just a recent example. And the expressiveness of a language isn't even a criterion!
Feb 01 2007
John wrote:D has now surpassed C++ in overall performance at the "Computer Language Shootout" website. This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC). http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1Only if you take memory into account. CPU performance is still not up to par. The recursive and the mandelbrot are the biggest performance eaters. Recursive is the same as gcc so it must be a compiler thing I guess. -Joel
Feb 01 2007
janderson Wrote:John wrote:Yeah, I would really like to see GDC added but they said it would be "too difficult" to install.D has now surpassed C++ in overall performance at the "Computer Language Shootout" website. This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC). http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1Only if you take memory into account. CPU performance is still not up to par. The recursive and the mandelbrot are the biggest performance eaters. Recursive is the same as gcc so it must be a compiler thing I guess. -Joel
Feb 01 2007
John wrote:Yeah, I would really like to see GDC added but they said it would be "too difficult" to install.Yeah, this would be a better benchmark (never perfect of course) of the difference the language syntax itself makes to performance.
Feb 02 2007
John wrote:janderson Wrote:Now this _is_ to worry about. The Shootout guys never purported to be Universal Gurus, but they're sure as heck no first-timers either. And if that kind of folks are, er, un-eager to install GDC, then something really ought to change. And before anybody pushes the Reply button, I've got things: - I know from beforehand what some Nordic Guys would say -- so don't. - Yes, there are RPMs for a gazillion Linux versions (sorry, Richard (M.S.) hit me with a memory stick: I mean _GNU_ [whatever] Versions) (( who said communism excludes imperialism???)), and there are other ready-to-use packages for other Linuxes, and even source distros. And (this really being the point: ) whatever we have or don't have, is secondary to the "user experience". Meaning, if folks perceive this as "difficult", then - I've always felt embarrassed because I felt "it too difficult to bother". I'm starting to suspect I'm not alone, alone, alone...... - Some (most?) of those who have GDC installed (and the next version installed and t.n.v. installed...), have probably gotten so used to the install procedure that they actually don't perceive it as cumbersome and/or difficult anymore. (You only count if you've got your GCC intact and usable at will!) I've nothing against GDC, its installing procedure or anything. My point is only that people who are used to it may not anymore be in a position to appreciate how daunting a ( _GDC_ ) newcomer (as opposed to D newcomer in general) might perceive the job of (finding out the procedure in the first place, and) downloading the appropriate file(s), checking out (from some authority on GDC stuff) whether ( /this/ ) GDC will fu... crap up their ( /this/ ) GCC installation (and if so, should they consider this as a once-only inconvenience or prepare for it as a fact of life?), etc, etc...John wrote:Yeah, I would really like to see GDC added but they said it would be "too difficult" to install.D has now surpassed C++ in overall performance at the "Computer Language Shootout" website. This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC). http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1Only if you take memory into account. CPU performance is still not up to par. The recursive and the mandelbrot are the biggest performance eaters. Recursive is the same as gcc so it must be a compiler thing I guess.
Feb 04 2007
On Thu, 01 Feb 2007 18:30:55 -0800, janderson wrote:John wrote:Well the gcc mandelbrot use sse commands for fast computations maybe when D get vectorization this will change. I noticed that gcc recursive uses template < class N > N Fib(N n) { return __builtin_expect(n < 2, 0) ? 1 : Fib(n - 2) + Fib(n - 1); } while D uses template Fib(T) { T Fib(T n) { if(n < 2) return 1; else return Fib(n-2) + Fib(n-1); } } I remember a while back I notice that there is a speed difference between using x<y ? a:b; and using if (x<y) a; else b; maybe they are not optimized the same way ??? KnudD has now surpassed C++ in overall performance at the "Computer Language Shootout" website. This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC). http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1Only if you take memory into account. CPU performance is still not up to par. The recursive and the mandelbrot are the biggest performance eaters. Recursive is the same as gcc so it must be a compiler thing I guess. -Joel
Feb 02 2007
Knud Soerensen wrote:On Thu, 01 Feb 2007 18:30:55 -0800, janderson wrote:I would argue that that shouldn't be allowed.John wrote:Well the gcc mandelbrot use sse commands for fast computations maybe when D get vectorization this will change. I noticed that gcc recursive uses template < class N > N Fib(N n) { return __builtin_expect(n < 2, 0) ? 1 : Fib(n - 2) + Fib(n - 1); }D has now surpassed C++ in overall performance at the "Computer Language Shootout" website. This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC). http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1Only if you take memory into account. CPU performance is still not up to par. The recursive and the mandelbrot are the biggest performance eaters. Recursive is the same as gcc so it must be a compiler thing I guess. -Joelwhile D uses template Fib(T) { T Fib(T n) { if(n < 2) return 1; else return Fib(n-2) + Fib(n-1); } } I remember a while back I notice that there is a speed difference between using x<y ? a:b; and using if (x<y) a; else b; maybe they are not optimized the same way ???Good point. It should be something optimized by the compiler.
Feb 02 2007
Knud Soerensen wrote:I remember a while back I notice that there is a speed difference between using x<y ? a:b; and using if (x<y) a; else b; maybe they are not optimized the same way ??? KnudI tested both, and it seemed that the ternary operator (?:) was a bit slower than the if/else. I just ran the recursive benchmark a few times, and using the ternary operator resulted in about 0.3 seconds slower run times (about 5.0 seconds versus about 5.3 seconds). -- Remove ".doesnotlike.spam" from the mail address.
Feb 02 2007
John wrote:This change came about with the upgrade to 1.004 from 1.000 (I'm guessing because of the new GC).The NRVO has a significant effect, as well as the tail recursion optimizations added.
Feb 02 2007
Walter Bright wrote:John wrote:Great job on the optimizations! C++ users have even less of an argument for using the language. A couple of cases even shows that the GC (which is the common complaint) performs better then C++ for those particular programs. -JoelThis change came about with the upgrade to 1.004 from 1.000> (I'm guessing because of the new GC). The NRVO has a significant effect, as well as the tail recursion optimizations added.
Feb 02 2007