Thread overview | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 01, 2007 D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
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 |
February 01, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | 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=1
Nice. Then again, neither intel nor microsoft's compilers were in the shootout. Would have been interesting to see.
|
February 01, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | 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=1
The 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!
|
February 02, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andreas Kochenburger | Andreas Kochenburger wrote:
> 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=1
>>
>
> The 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!
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.
-Joel
|
February 02, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | 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=1
Only 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
|
February 02, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to janderson | janderson Wrote:
> 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=1
>
>
> Only 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
Yeah, I would really like to see GDC added but they said it would be "too difficult" to install.
|
February 02, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | 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.
|
February 02, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to janderson | On Thu, 01 Feb 2007 18:30:55 -0800, janderson wrote:
> 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=1
>
>
> Only 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
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 ???
Knud
|
February 02, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to Knud Soerensen | Knud Soerensen wrote: > On Thu, 01 Feb 2007 18:30:55 -0800, janderson wrote: > >> 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=1 >> >> Only 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 > > 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); > } > I would argue that that shouldn't be allowed. > 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 ??? Good point. It should be something optimized by the compiler. |
February 02, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | 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.
|
Copyright © 1999-2021 by the D Language Foundation