digitalmars.D - dmd-built dmd is faster that ldc-built dmd or gdc-built dmd?
- Vladimir Panteleev (21/21) Mar 11 2016 Hi,
- Iain Buclaw (4/15) Mar 11 2016 https://github.com/D-Programming-Language/dmd/blob/master/src/root/rmem....
- Vladimir Panteleev (3/24) Mar 11 2016 Thanks :) After changing that to version(all), LDC is faster now.
- Edwin van Leeuwen (3/5) Mar 11 2016 How much faster is LDC?
- Vladimir Panteleev (2/7) Mar 11 2016 About 10%, but I didn't measure rigorously.
- Iain Buclaw (6/13) Mar 11 2016 Yes, I know. And if I were to say which behaviour is desired.
- Johan Engelen (5/7) Mar 11 2016 I can't judge what is best here, but LDC does not always mark
- David Nadlinger (9/13) Mar 11 2016 I distinctly remember Daniel and me having to remove those
Hi, In the process of setting up a new development environment, I noticed that DMD's codegen seems to outperform GDC's or LDC's when building DMD itself. I wrote a test script to measure the time it takes for DMD (built with different compilers) to build Phobos: http://dump.thecybershadow.net/9e42ff2858d1419cf41108cc50b0a83a/bench.sh My results are: dmd: 11.26 ldc: 15.35 gdc: 14.80 Compiler versions: LDC - the LLVM D compiler (0.17.0): based on DMD v2.068.2 and LLVM 3.7.1 gdc (GCC) 5.3.0 GDC/LDC binaries are the ones packaged in Arch Linux. Host DMD is the one installed and chosen by AUTO_BOOTSTRAP (2.068.2). Target DMD/Phobos is from git master and built with ENABLE_RELEASE=1. To me this seems surprising, especially considering that on Windows I used to get a significant speed increase when building DMD with MSVC instead of DMC.
Mar 11 2016
On Friday, 11 March 2016 at 13:39:04 UTC, Vladimir Panteleev wrote:Hi, In the process of setting up a new development environment, I noticed that DMD's codegen seems to outperform GDC's or LDC's when building DMD itself. I wrote a test script to measure the time it takes for DMD (built with different compilers) to build Phobos: http://dump.thecybershadow.net/9e42ff2858d1419cf41108cc50b0a83a/bench.sh My results are: dmd: 11.26 ldc: 15.35 gdc: 14.80https://github.com/D-Programming-Language/dmd/blob/master/src/root/rmem.d#L166-L193 How memory is allocated makes a huge difference.
Mar 11 2016
On Friday, 11 March 2016 at 14:32:26 UTC, Iain Buclaw wrote:On Friday, 11 March 2016 at 13:39:04 UTC, Vladimir Panteleev wrote:Thanks :) After changing that to version(all), LDC is faster now. Doesn't build with GDC though (multiple definitions)...Hi, In the process of setting up a new development environment, I noticed that DMD's codegen seems to outperform GDC's or LDC's when building DMD itself. I wrote a test script to measure the time it takes for DMD (built with different compilers) to build Phobos: http://dump.thecybershadow.net/9e42ff2858d1419cf41108cc50b0a83a/bench.sh My results are: dmd: 11.26 ldc: 15.35 gdc: 14.80https://github.com/D-Programming-Language/dmd/blob/master/src/root/rmem.d#L166-L193 How memory is allocated makes a huge difference.
Mar 11 2016
On Friday, 11 March 2016 at 14:46:59 UTC, Vladimir Panteleev wrote:Thanks :) After changing that to version(all), LDC is faster now. Doesn't build with GDC though (multiple definitions)...How much faster is LDC?
Mar 11 2016
On Friday, 11 March 2016 at 15:04:44 UTC, Edwin van Leeuwen wrote:On Friday, 11 March 2016 at 14:46:59 UTC, Vladimir Panteleev wrote:About 10%, but I didn't measure rigorously.Thanks :) After changing that to version(all), LDC is faster now. Doesn't build with GDC though (multiple definitions)...How much faster is LDC?
Mar 11 2016
On Friday, 11 March 2016 at 14:46:59 UTC, Vladimir Panteleev wrote:On Friday, 11 March 2016 at 14:32:26 UTC, Iain Buclaw wrote:Yes, I know. And if I were to say which behaviour is desired. I'd say GDC is doing the right thing. Marking all functions as 'weak' is a terrible idea on both DMD's and LDC's part.https://github.com/D-Programming-Language/dmd/blob/master/src/root/rmem.d#L166-L193 How memory is allocated makes a huge difference.Thanks :) After changing that to version(all), LDC is faster now. Doesn't build with GDC though (multiple definitions)...
Mar 11 2016
On Friday, 11 March 2016 at 15:09:26 UTC, Iain Buclaw wrote:Marking all functions as 'weak' is a terrible idea on both DMD's and LDC's part.I can't judge what is best here, but LDC does not always mark functions as weak. After the DDMD switch, we have multiple def. problems on Windows when bootstrapping using LDC 0.17: https://github.com/ldc-developers/ldc/issues/1310
Mar 11 2016
On Friday, 11 March 2016 at 15:09:26 UTC, Iain Buclaw wrote:Yes, I know. And if I were to say which behaviour is desired. I'd say GDC is doing the right thing. Marking all functions as 'weak' is a terrible idea on both DMD's and LDC's part.I distinctly remember Daniel and me having to remove those functions from DDMD when we first got it to build with LDC during/after DConf 2015. LDC definitely does not mark symbols as weak/comdat/etc. by default. However, the linker might not pull in an object file from a static library if the respective symbols have already been resolved using other files. — David
Mar 11 2016