digitalmars.D - gdc and the Computer Language Benchmarks Game
- Guido Schimmels (19/19) Jun 28 2007 Hello,
- renoX (7/35) Jun 29 2007 Uh? I thought that it was against the rule of this shootout to do this
- Dave (4/43) Jun 29 2007 On my machine at least, DMD 1.014 performs better than GDC 0.23 for a co...
- Guido Schimmels (4/6) Jun 30 2007 Ah! Still, D seems to have the potential to lead the pack, which I would...
Hello, I've been curious last night, how D does in the language shootout: http://shootout.alioth.debian.org/gp4/ It's reasonably close to C or C++ with dmd - good. Then I looked where D fares especially bad. That's a) mandelbrot: factor 2.0 slower than both C and C++ and b) recursive: factor 2.5 slower than C and factor 2.7 slower than C++ So I wanted to know, if gdc makes a difference here - and boy it does. mandelbrot.d: gdc beats dmd by factor 1.8 recursive.d: gdc beats dmd by factor 2.22 compiler: dmd-1.015, gdc-0.23, gcc-4.1.1 (i686-linux) command line: (g)dmd -O -inline -release So gdc gets those within 5%-10% range of GNU C/C++. In the mandelbrot case this is especially remarkable, since both the C and C++ code is hand-tweaked for SSE2, while the D code is generic straight-foward fp. In light of this, gdc compiled D might even end up topping that list. So I wish the D community makes sure not to miss that opportunity to promote the language. Guido
Jun 28 2007
Guido Schimmels a écrit :Hello, I've been curious last night, how D does in the language shootout: http://shootout.alioth.debian.org/gp4/ It's reasonably close to C or C++ with dmd - good. Then I looked where D fares especially bad. That's a) mandelbrot: factor 2.0 slower than both C and C++ and b) recursive: factor 2.5 slower than C and factor 2.7 slower than C++ So I wanted to know, if gdc makes a difference here - and boy it does. mandelbrot.d: gdc beats dmd by factor 1.8 recursive.d: gdc beats dmd by factor 2.22 compiler: dmd-1.015, gdc-0.23, gcc-4.1.1 (i686-linux) command line: (g)dmd -O -inline -release So gdc gets those within 5%-10% range of GNU C/C++. In the mandelbrot case this is especially remarkable, since both the C and C++ code is hand-tweaked for SSE2,Uh? I thought that it was against the rule of this shootout to do this kind of optimisation? Otherwise, you could include assembly code in a D program and benchmark it as a D program which obviously it isn't.. Regards, renoXwhile the D code is generic straight-foward fp. In light of this, gdc compiled D might even end up topping that list. So I wish the D community makes sure not to miss that opportunity to promote the language. Guido
Jun 29 2007
renoX wrote:Guido Schimmels a écrit :On my machine at least, DMD 1.014 performs better than GDC 0.23 for a couple of the other current tests, so it may be a wash in the end. But it would be nice if they'd put GDC up there too.Hello, I've been curious last night, how D does in the language shootout: http://shootout.alioth.debian.org/gp4/ It's reasonably close to C or C++ with dmd - good. Then I looked where D fares especially bad. That's a) mandelbrot: factor 2.0 slower than both C and C++ and b) recursive: factor 2.5 slower than C and factor 2.7 slower than C++ So I wanted to know, if gdc makes a difference here - and boy it does. mandelbrot.d: gdc beats dmd by factor 1.8 recursive.d: gdc beats dmd by factor 2.22 compiler: dmd-1.015, gdc-0.23, gcc-4.1.1 (i686-linux) command line: (g)dmd -O -inline -releaseIt looks like it's done with an intrinsics library, so it's probably right on the edge <g>.So gdc gets those within 5%-10% range of GNU C/C++. In the mandelbrot case this is especially remarkable, since both the C and C++ code is hand-tweaked for SSE2,Uh? I thought that it was against the rule of this shootout to do this kind of optimisation?Otherwise, you could include assembly code in a D program and benchmark it as a D program which obviously it isn't.. Regards, renoXwhile the D code is generic straight-foward fp. In light of this, gdc compiled D might even end up topping that list. So I wish the D community makes sure not to miss that opportunity to promote the language. Guido
Jun 29 2007
Dave Wrote:On my machine at least, DMD 1.014 performs better than GDC 0.23 for a couple of the other current tests, so it may be a wash in the end. But it would be nice if they'd put GDC up there too.Ah! Still, D seems to have the potential to lead the pack, which I wouldn't have necessarily expected. Wonder why dmd fouls up so badly with the canonical textbook example. Computes the fibonacci barely faster than Java, juck! DMD struggling with the templates? Guido
Jun 30 2007