Re: Is dmd fast?

2016-08-08 Thread Nordlöw via Digitalmars-d
On Friday, 24 June 2016 at 09:09:49 UTC, Nordlöw wrote: What about adding a flag to DMD that overrides the default name for the linker from `ld` to `ld.gold`? Ping!

Re: Is dmd fast?

2016-08-05 Thread Kagamin via Digitalmars-d
BTW, anybody tested LLD? They claim it's faster than gold http://lld.llvm.org/NewLLD.html

Re: Is dmd fast?

2016-07-06 Thread Tofu Ninja via Digitalmars-d
On Wednesday, 6 July 2016 at 19:12:23 UTC, ketmar wrote: On Wednesday, 6 July 2016 at 08:13:01 UTC, Tofu Ninja wrote: On Wednesday, 6 July 2016 at 05:46:20 UTC, ketmar wrote: On Wednesday, 6 July 2016 at 05:38:25 UTC, Tofu Ninja wrote: dmd seems pretty fast to me. add "-O -inline" and go to

Re: Is dmd fast?

2016-07-06 Thread ketmar via Digitalmars-d
On Wednesday, 6 July 2016 at 08:13:01 UTC, Tofu Ninja wrote: On Wednesday, 6 July 2016 at 05:46:20 UTC, ketmar wrote: On Wednesday, 6 July 2016 at 05:38:25 UTC, Tofu Ninja wrote: dmd seems pretty fast to me. add "-O -inline" and go to bed. ;-) Went up to about 18s for a full rebuild of the

Re: Is dmd fast?

2016-07-06 Thread Tofu Ninja via Digitalmars-d
On Wednesday, 6 July 2016 at 05:46:20 UTC, ketmar wrote: On Wednesday, 6 July 2016 at 05:38:25 UTC, Tofu Ninja wrote: dmd seems pretty fast to me. add "-O -inline" and go to bed. ;-) Went up to about 18s for a full rebuild of the project and the dub dependencies, I am ok with these times

Re: Is dmd fast?

2016-07-06 Thread ketmar via Digitalmars-d
On Wednesday, 6 July 2016 at 06:10:20 UTC, thedeemon wrote: On Wednesday, 6 July 2016 at 05:46:20 UTC, ketmar wrote: On Wednesday, 6 July 2016 at 05:38:25 UTC, Tofu Ninja wrote: dmd seems pretty fast to me. add "-O -inline" and go to bed. ;-) Nah, in my multi-KLOC project the difference

Re: Is dmd fast?

2016-07-06 Thread thedeemon via Digitalmars-d
On Wednesday, 6 July 2016 at 05:46:20 UTC, ketmar wrote: On Wednesday, 6 July 2016 at 05:38:25 UTC, Tofu Ninja wrote: dmd seems pretty fast to me. add "-O -inline" and go to bed. ;-) Nah, in my multi-KLOC project the difference between debug (-g) and release (-O -inline) is like 6 vs. 8

Re: Is dmd fast?

2016-07-05 Thread ketmar via Digitalmars-d
On Wednesday, 6 July 2016 at 05:38:25 UTC, Tofu Ninja wrote: dmd seems pretty fast to me. add "-O -inline" and go to bed. ;-)

Re: Is dmd fast?

2016-07-05 Thread Tofu Ninja via Digitalmars-d
On Wednesday, 22 June 2016 at 19:56:26 UTC, Adam D. Ruppe wrote: On Wednesday, 22 June 2016 at 19:25:13 UTC, Jack Stouffer wrote: So if linking is slow, then compilation is slow. But, 1/3 second isn't slow... I don't feel compilation is slow until it takes more like 5 seconds. Certainly,

Re: Is dmd fast?

2016-07-05 Thread qznc via Digitalmars-d
On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote: Walter and we as a community often claim that dmd is fast as in "compiles quickly". Go also claims this. Rust does not. They even state that compilation speed is one of the big tasks they are working on. I found a comparison for D and

Re: Is dmd fast?

2016-06-24 Thread Nordlöw via Digitalmars-d
On Thursday, 23 June 2016 at 07:14:02 UTC, Nordlöw wrote: On Ubuntu/Debian you should use sudo update-alternatives --config ld to configure this. Hmm, my prompt answers: update-alternatives: error: no alternatives for ld Doesn't this work anymore?

Re: Is dmd fast?

2016-06-24 Thread Nordlöw via Digitalmars-d
On Friday, 24 June 2016 at 09:09:49 UTC, Nordlöw wrote: What about adding a flag to DMD that overrides the default name for the linker from `ld` to `ld.gold`? Something like dmd -linker=ld.gold ...

Re: Is dmd fast?

2016-06-24 Thread Nordlöw via Digitalmars-d
On Thursday, 23 June 2016 at 07:14:02 UTC, Nordlöw wrote: The GNU gold linker should be the default on newer distributions. It seems the non-gold version is the default, on my Ubuntu 16.04. It would be nice to automate the step of choosing the fast gold-version, so I don't have to bother

Re: Is dmd fast?

2016-06-23 Thread Nordlöw via Digitalmars-d
On Thursday, 23 June 2016 at 14:28:08 UTC, Andrei Alexandrescu wrote: Is there a way to tell? Thanks! -- Andrei ld --version I presume.

Re: Is dmd fast?

2016-06-23 Thread deadalnix via Digitalmars-d
On Thursday, 23 June 2016 at 14:28:08 UTC, Andrei Alexandrescu wrote: On 06/23/2016 03:14 AM, Nordlöw wrote: On Wednesday, 22 June 2016 at 19:20:42 UTC, deadalnix wrote: You methodology is flawed. You are essentially measuring link time against the standard lib. If you're sitting on Linux

Re: Is dmd fast?

2016-06-23 Thread Brad Anderson via Digitalmars-d
On Thursday, 23 June 2016 at 17:57:33 UTC, Andrei Alexandrescu wrote: On 06/23/2016 01:33 PM, David Nadlinger wrote: On Thursday, 23 June 2016 at 17:24:34 UTC, Andrei Alexandrescu wrote: On my Ubuntu, /usr/bin/ld -> x86_64-linux-gnu-ld. What does that mean? -- Andrei `ld --version` should

Re: Is dmd fast?

2016-06-23 Thread ketmar via Digitalmars-d
On Thursday, 23 June 2016 at 17:39:45 UTC, Daniel Kozak wrote: [kozzi@samuel ~]$ dmd -defaultlib=libphobos2.so a.d [kozzi@samuel ~]$ time for t in {1..1000}; do ./a; done > /dev/null real0m7.187s user0m4.470s sys0m0.943s [kozzi@samuel ~]$ dmd -defaultlib=libphobos2.a a.d

Re: Is dmd fast?

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
On 06/23/2016 01:33 PM, David Nadlinger wrote: On Thursday, 23 June 2016 at 17:24:34 UTC, Andrei Alexandrescu wrote: On my Ubuntu, /usr/bin/ld -> x86_64-linux-gnu-ld. What does that mean? -- Andrei `ld --version` should clear that up. ;) GNU ld (GNU Binutils for Ubuntu) 2.26 So how do I

Re: Is dmd fast?

2016-06-23 Thread Daniel Kozak via Digitalmars-d
Dne 23.6.2016 v 19:24 Andrei Alexandrescu via Digitalmars-d napsal(a): On 06/23/2016 10:36 AM, ketmar wrote: as of the linker itsef, on most systems /usr/bin/ld is just a symling to either ld.bfd or ld.gold. we can include some notion in DMD documentation regarding to that. On my Ubuntu,

Re: Is dmd fast?

2016-06-23 Thread Daniel Kozak via Digitalmars-d
Dne 23.6.2016 v 16:39 ketmar via Digitalmars-d napsal(a): On Thursday, 23 June 2016 at 13:32:35 UTC, Daniel Kozak wrote: Or on linux use ld.gold instead of ld.bfd. Using .so instead of .a has another problem with speed. Application link against static phobos lib is much faster than against

Re: Is dmd fast?

2016-06-23 Thread David Nadlinger via Digitalmars-d
On Thursday, 23 June 2016 at 17:24:34 UTC, Andrei Alexandrescu wrote: On my Ubuntu, /usr/bin/ld -> x86_64-linux-gnu-ld. What does that mean? -- Andrei `ld --version` should clear that up. ;) — David

Re: Is dmd fast?

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
On 06/23/2016 10:36 AM, ketmar wrote: as of the linker itsef, on most systems /usr/bin/ld is just a symling to either ld.bfd or ld.gold. we can include some notion in DMD documentation regarding to that. On my Ubuntu, /usr/bin/ld -> x86_64-linux-gnu-ld. What does that mean? -- Andrei

Re: Is dmd fast?

2016-06-23 Thread ketmar via Digitalmars-d
On Thursday, 23 June 2016 at 13:32:35 UTC, Daniel Kozak wrote: Or on linux use ld.gold instead of ld.bfd. Using .so instead of .a has another problem with speed. Application link against static phobos lib is much faster than against dynamic version. either i didn't understood you right, or...

Re: Is dmd fast?

2016-06-23 Thread ketmar via Digitalmars-d
On Thursday, 23 June 2016 at 14:28:08 UTC, Andrei Alexandrescu wrote: The GNU gold linker should be the default on newer distributions. Is there a way to tell? Thanks! -- Andrei it's not something dmd should enforce: it is the system setting under user control. there may be many various

Re: Is dmd fast?

2016-06-23 Thread Andrei Alexandrescu via Digitalmars-d
On 06/23/2016 03:14 AM, Nordlöw wrote: On Wednesday, 22 June 2016 at 19:20:42 UTC, deadalnix wrote: You methodology is flawed. You are essentially measuring link time against the standard lib. If you're sitting on Linux make sure that you're using the GNU gold linker (`ld.gold`) by default

Re: Is dmd fast?

2016-06-23 Thread Daniel Kozak via Digitalmars-d
Or on linux use ld.gold instead of ld.bfd. Using .so instead of .a has another problem with speed. Application link against static phobos lib is much faster than against dynamic version. Dne 22.6.2016 v 21:33 ketmar via Digitalmars-d napsal(a): On Wednesday, 22 June 2016 at 19:25:13 UTC,

Re: Is dmd fast?

2016-06-23 Thread Nordlöw via Digitalmars-d
On Wednesday, 22 June 2016 at 19:20:42 UTC, deadalnix wrote: You methodology is flawed. You are essentially measuring link time against the standard lib. If you're sitting on Linux make sure that you're using the GNU gold linker (`ld.gold`) by default (`ld`). On Ubuntu/Debian you should use

Re: Is dmd fast?

2016-06-22 Thread Walter Bright via Digitalmars-d
On 6/22/2016 7:28 AM, Adam D. Ruppe wrote: On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote: RDMD 0:00:00.275884 DMD 0:00:00.311102 Since rdmd is just a script wrapper around dmd, it shouldn't actually be faster. rdmd caches "script" programs, so could be faster.

Re: Is dmd fast?

2016-06-22 Thread qznc via Digitalmars-d
On Wednesday, 22 June 2016 at 19:56:26 UTC, Adam D. Ruppe wrote: D compile speed typically *scales* better than the competition. Instead of chasing the 100ms in hello world, it tackles the 1ms of a real project. Ok, but this is hard to test. It is not feasible to build the same real

Re: Is dmd fast?

2016-06-22 Thread deadalnix via Digitalmars-d
On Wednesday, 22 June 2016 at 19:25:13 UTC, Jack Stouffer wrote: On Wednesday, 22 June 2016 at 19:20:42 UTC, deadalnix wrote: You methodology is flawed. You are essentially measuring link time against the standard lib. As someone else in the thread alluded to, people don't care about the

Re: Is dmd fast?

2016-06-22 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 22 June 2016 at 19:25:13 UTC, Jack Stouffer wrote: So if linking is slow, then compilation is slow. But, 1/3 second isn't slow... I don't feel compilation is slow until it takes more like 5 seconds. Certainly, 1/3s is noticable (if you do a hello world with printf instead of

Re: Is dmd fast?

2016-06-22 Thread ketmar via Digitalmars-d
On Wednesday, 22 June 2016 at 19:25:13 UTC, Jack Stouffer wrote: On Wednesday, 22 June 2016 at 19:20:42 UTC, deadalnix wrote: You methodology is flawed. You are essentially measuring link time against the standard lib. As someone else in the thread alluded to, people don't care about the

Re: Is dmd fast?

2016-06-22 Thread Jack Stouffer via Digitalmars-d
On Wednesday, 22 June 2016 at 19:20:42 UTC, deadalnix wrote: You methodology is flawed. You are essentially measuring link time against the standard lib. As someone else in the thread alluded to, people don't care about the nuance, and it's not particularly important. Linking is part of the

Re: Is dmd fast?

2016-06-22 Thread deadalnix via Digitalmars-d
On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote: Walter and we as a community often claim that dmd is fast as in "compiles quickly". Go also claims this. Rust does not. They even state that compilation speed is one of the big tasks they are working on. From the general sentiment, I

Re: Is dmd fast?

2016-06-22 Thread Icecream Bob via Digitalmars-d
On Wednesday, 22 June 2016 at 14:11:12 UTC, Jack Stouffer wrote: On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote: ... Including scripting languages in that example is unfair as they only lex the file. Right away you can tell that "Hello World" is a poor example of fast compile

Re: Is dmd fast?

2016-06-22 Thread jmh530 via Digitalmars-d
On Wednesday, 22 June 2016 at 14:28:28 UTC, qznc wrote: Rust faster than Go? That still seems weird. I like your overall benchmark. Measuring build times there seems like a good idea. I'm more surprised that Go is faster than D.

Re: Is dmd fast?

2016-06-22 Thread ketmar via Digitalmars-d
On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote: Destroy! microbenchmarks sux. destruction sequence complete.

Re: Is dmd fast?

2016-06-22 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 22 June 2016 at 14:28:19 UTC, Adam D. Ruppe wrote: BTW this more measures linker speed than compiler. dmd -c -o- just runs the compiler and skips filesystem output... it'd be pretty fast and if there's similar options for other compilers (gcc has -c too at least) it might be

Re: Is dmd fast?

2016-06-22 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote: RDMD 0:00:00.275884 DMD 0:00:00.311102 Since rdmd is just a script wrapper around dmd, it shouldn't actually be faster. BTW this more measures linker speed than compiler. dmd -c -o- just runs the compiler and skips

Re: Is dmd fast?

2016-06-22 Thread qznc via Digitalmars-d
On Wednesday, 22 June 2016 at 14:28:19 UTC, Adam D. Ruppe wrote: On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote: RDMD 0:00:00.275884 DMD 0:00:00.311102 Since rdmd is just a script wrapper around dmd, it shouldn't actually be faster. BTW this more measures linker

Re: Is dmd fast?

2016-06-22 Thread qznc via Digitalmars-d
On Wednesday, 22 June 2016 at 14:11:12 UTC, Jack Stouffer wrote: On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote: ... Including scripting languages in that example is unfair as they only lex the file. Sure. Especially bash, which is always in RAM anyways. It shows the possible

Re: Is dmd fast?

2016-06-22 Thread Jack Stouffer via Digitalmars-d
On Wednesday, 22 June 2016 at 13:46:50 UTC, qznc wrote: ... Including scripting languages in that example is unfair as they only lex the file. Right away you can tell that "Hello World" is a poor example of fast compile times because GCC is near the top; (as you probably know) large Cpp

Is dmd fast?

2016-06-22 Thread qznc via Digitalmars-d
Walter and we as a community often claim that dmd is fast as in "compiles quickly". Go also claims this. Rust does not. They even state that compilation speed is one of the big tasks they are working on. From the general sentiment, I would expect that dmd performs on the level of Go and Rust