June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | On 6/3/11 7:42 PM, Andrej Mitrovic wrote:
> DMD debug: 50s
> DMD optimized: 49s (-release -noboundscheck -O -inline -L/STACK:1280000000)
>
> That's around 1GB of stack memory.
> Compiling with GDC will make the app throw an exception at runtime due
> to the stack being blown, the error message isn't special but it's
> better than no error message.
>
> GDC debug: 1m:24s
> GDC optimized: 1m:12s (gdc -v2 -O3 -Wl,--stack,1280000000)
>
> I haven't tested the other ones. Does Go have a Windows compiler yet?
I think they do. But another good data point would be the C++ timings on the same machine.
Andrei
| |||
June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | I've compiled the C++ example from google, but I had to remove the "-lc" option due to errors (what is this option anyway?). gcc 4.4.0 with -O3: 1:50 | |||
June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
SORRY, I meant gcc 4.5.2 not 4.4.0. | ||||
June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
I can't compile bear's C++0x example, I get a ton of undefined reference errors. I've tried with: gcc -O3 -std=gnu++0x raw.cpp Maybe he's using gcc 4.6 or I'm missing some flags. | ||||
June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | On 6/3/11 8:05 PM, Andrej Mitrovic wrote:
> I've compiled the C++ example from google, but I had to remove the
> "-lc" option due to errors (what is this option anyway?).
>
> gcc 4.4.0 with -O3: 1:50
Hmm, it would be odd if the D version is more than twice faster than the C++ one. Wonder what's going on there.
Andrei
| |||
June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
It seems I should have used g++: g++ -O3 -std=gnu++0x -Wl,--stack,1280000000 raw.cpp time: 2m:12s | ||||
June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
I'll give a shot at compiling on Linux, maybe this is all MinGW's fault. | ||||
June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
What do I use to accurately time an executable under Linux? | ||||
June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
Running Ubuntu v10.10 x32 on Virtualbox with hardware virtualization, GCC v4.4.4 and DMD 2.053 installed. DMD debug: 54s DMD optimized: 47s Google's C++ optimized: 27s (gcc -O3 -lc -lstdc++) Bear's C++ optimized: 24s (g++ -O3 -std=gnu++0x) So it's MinGW's fault apparently. | ||||
June 04, 2011 Re: Port a benchmark to D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | On 06/03/2011 08:47 PM, Andrej Mitrovic wrote:
> Running Ubuntu v10.10 x32 on Virtualbox with hardware virtualization,
> GCC v4.4.4 and DMD 2.053 installed.
>
> DMD debug: 54s
> DMD optimized: 47s
>
> Google's C++ optimized: 27s (gcc -O3 -lc -lstdc++)
> Bear's C++ optimized: 24s (g++ -O3 -std=gnu++0x)
>
> So it's MinGW's fault apparently.
Interesting. So now we have a run time comparable with C++'s run time in the paper. The implementation by bearophile has 721 lines. Once we have compilation times, binary size, and memory footprint, we have a good comparison point with the study in the paper.
Far as I can tell D comes in the second place after C++ at run time. With optimizations and all it could get significantly closer.
Thanks,
Andrei
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply