www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Compile Times on Windows

reply "zebrazebra" <zebra serengeti.plains> writes:
Wondering what is the average compile time users face on Wdinows
is. I just downloaded dmd today to start learning some d and it
takes 5 seconds for me to compile a simple "hello, world".
Wondering if I have something messed up?

My laptop is Windows laptop, Win 8.1, 4th gen i7 intel processor
and plenty of rAM.

[Sat May 09 00:32:20 zebra ZEBRA:~/personal/d ]
$ cat hello.d
#!/usr/bin/env rdmd
import std.stdio;
void main() {
           writeln("Hello, world!");
}[Sat May 09 00:32:23 zebra ZEBRA:~/personal/d ]
$ dmd --version
DMD32 D Compiler v2.067.1
Copyright (c) 1999-2014 by Digital Mars written by Walter Bright
[Sat May 09 00:32:27 zebra ZEBRA:~/personal/d ]
$ which dmd
/c/D/dmd2/windows/bin/dmd
[Sat May 09 00:32:29 zebra ZEBRA:~/personal/d ]
$ time dmd hello.d

real    0m4.243s
user    0m0.015s
sys     0m0.031s
[Sat May 09 00:35:00 zebra ZEBRA:~/personal/d ]
$ time gdc hello.d

real    0m12.301s
user    0m0.015s
sys     0m0.030s
May 09 2015
next sibling parent reply "Manfred Nowak" <svv1999 hotmail.com> writes:
zebrazebra wrote:
 $ time dmd hello.d

 real    0m4.243s
 user    0m0.015s
 sys     0m0.031s
$ time ./hello.d Hello, world! real 0m0.039s user 0m0.000s sys 0m0.015s Why is the "Hello, world!" missing in your post? -manfred
May 09 2015
parent reply "weaselcat" <weaselcat gmail.com> writes:
On Saturday, 9 May 2015 at 10:00:53 UTC, Manfred Nowak wrote:
 zebrazebra wrote:
 $ time dmd hello.d

 real    0m4.243s
 user    0m0.015s
 sys     0m0.031s
$ time ./hello.d Hello, world! real 0m0.039s user 0m0.000s sys 0m0.015s Why is the "Hello, world!" missing in your post? -manfred
he's timing compilation, not runtime. $ time dmd hello.d 0.30user 0.08system 0:00.40elapsed might be a windows issue?
May 09 2015
parent reply Dave Akers <dave dazoe.net> writes:
On Sat, 09 May 2015 10:17:29 +0000, weaselcat wrote:

 On Saturday, 9 May 2015 at 10:00:53 UTC, Manfred Nowak wrote:
 zebrazebra wrote:
 $ time dmd hello.d

 real    0m4.243s user    0m0.015s sys     0m0.031s
$ time ./hello.d Hello, world! real 0m0.039s user 0m0.000s sys 0m0.015s Why is the "Hello, world!" missing in your post? -manfred
he's timing compilation, not runtime. $ time dmd hello.d 0.30user 0.08system 0:00.40elapsed might be a windows issue?
weaselcat: Are you running windows 8.1 as well? It might be disk access time. Or an anti-virus program interfearing?
May 09 2015
next sibling parent "weaselcat" <weaselcat gmail.com> writes:
On Saturday, 9 May 2015 at 10:44:29 UTC, Dave Akers wrote:
 On Sat, 09 May 2015 10:17:29 +0000, weaselcat wrote:

 On Saturday, 9 May 2015 at 10:00:53 UTC, Manfred Nowak wrote:
 zebrazebra wrote:
 $ time dmd hello.d

 real    0m4.243s user    0m0.015s sys     0m0.031s
$ time ./hello.d Hello, world! real 0m0.039s user 0m0.000s sys 0m0.015s Why is the "Hello, world!" missing in your post? -manfred
he's timing compilation, not runtime. $ time dmd hello.d 0.30user 0.08system 0:00.40elapsed might be a windows issue?
weaselcat: Are you running windows 8.1 as well?
No, I use Arch Linux.
May 09 2015
prev sibling next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 5/9/2015 3:44 AM, Dave Akers wrote:
 Or an anti-virus program interfearing?
I had to disable Windows' built in antivirus because it is an anathema to a program that creates .exe files.
May 09 2015
next sibling parent "zebrazebra" <zebra serengeti.plains> writes:
On Saturday, 9 May 2015 at 10:54:11 UTC, Walter Bright wrote:
 On 5/9/2015 3:44 AM, Dave Akers wrote:
 Or an anti-virus program interfearing?
I had to disable Windows' built in antivirus because it is an anathema to a program that creates .exe files.
With antivirus (windows defender) disabled, compile times go down to ~1.7 seconds. On Saturday, 9 May 2015 at 16:04:55 UTC, Andrei Alexandrescu wrote:
 So from the shape of the cmdline I infer this is the 32 bit 
 compiler running under cygwin? These two elements might 
 influence speed. -- Andrei
Running under whatever bash emulation layer git comes with. 32 bit compiler I guess so from dmd --version. Is there a 64 bit compiler available for Windows? This is what I get after installing the d exe. [Sat May 09 09:38:10 zebra ZEBRA:/c/D ] $ find /c/D/ -type f -name "dmd.exe" /c/D/dmd2/windows/bin/dmd.exe For some comparison - here are some other timings (the gcc ex. is w/ antivirus disabled). [Sat May 09 09:39:14 ashwin ZEBRA:~/personal/d ] $ time gcc hello.c -o hello real 0m0.366s user 0m0.016s sys 0m0.031s [Sat May 09 09:39:26 zebra ZEBRA:~/personal/d ] $ time javac Hello.java && java Hello real 0m2.049s user 0m0.031s sys 0m0.015s [Sat May 09 09:43:34 zebra ZEBRA:~/personal/d ] $ time date Sat May 9 09:45:48 PDT 2015 real 0m0.169s user 0m0.015s sys 0m0.062s
May 09 2015
prev sibling parent reply "Brad Anderson" <eco gnuk.net> writes:
On Saturday, 9 May 2015 at 10:54:11 UTC, Walter Bright wrote:
 On 5/9/2015 3:44 AM, Dave Akers wrote:
 Or an anti-virus program interfearing?
I had to disable Windows' built in antivirus because it is an anathema to a program that creates .exe files.
I've never had any problems with it but you can disable scanning for particular directories instead of disabling the whole thing.
May 12 2015
parent reply "Brad Anderson" <eco gnuk.net> writes:
On Tuesday, 12 May 2015 at 17:00:00 UTC, Brad Anderson wrote:
 On Saturday, 9 May 2015 at 10:54:11 UTC, Walter Bright wrote:
 On 5/9/2015 3:44 AM, Dave Akers wrote:
 Or an anti-virus program interfearing?
I had to disable Windows' built in antivirus because it is an anathema to a program that creates .exe files.
I've never had any problems with it but you can disable scanning for particular directories instead of disabling the whole thing.
Also particular processes and file types.
May 12 2015
parent "zebrazebra" <zebra serengeti.plains> writes:
On Tuesday, 12 May 2015 at 17:00:50 UTC, Brad Anderson wrote:
 On Tuesday, 12 May 2015 at 17:00:00 UTC, Brad Anderson wrote:
 On Saturday, 9 May 2015 at 10:54:11 UTC, Walter Bright wrote:
 On 5/9/2015 3:44 AM, Dave Akers wrote:
 Or an anti-virus program interfearing?
I had to disable Windows' built in antivirus because it is an anathema to a program that creates .exe files.
I've never had any problems with it but you can disable scanning for particular directories instead of disabling the whole thing.
Also particular processes and file types.
Since even with anti-virus off, comple times are still high, I'm not pursuing disabling it as a solution. I'm leaving it alone for now, might come back to figure this out in the future.
May 12 2015
prev sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 5/9/15 3:44 AM, Dave Akers wrote:
 On Sat, 09 May 2015 10:17:29 +0000, weaselcat wrote:

 On Saturday, 9 May 2015 at 10:00:53 UTC, Manfred Nowak wrote:
 zebrazebra wrote:
 $ time dmd hello.d

 real    0m4.243s user    0m0.015s sys     0m0.031s
$ time ./hello.d Hello, world! real 0m0.039s user 0m0.000s sys 0m0.015s Why is the "Hello, world!" missing in your post? -manfred
he's timing compilation, not runtime. $ time dmd hello.d 0.30user 0.08system 0:00.40elapsed might be a windows issue?
weaselcat: Are you running windows 8.1 as well? It might be disk access time. Or an anti-virus program interfearing?
So from the shape of the cmdline I infer this is the 32 bit compiler running under cygwin? These two elements might influence speed. -- Andrei
May 09 2015
prev sibling parent "thedeemon" <dlang thedeemon.com> writes:
On Saturday, 9 May 2015 at 07:37:52 UTC, zebrazebra wrote:
 Wondering what is the average compile time users face on Wdinows
 is. I just downloaded dmd today to start learning some d and it
 takes 5 seconds for me to compile a simple "hello, world".
 Wondering if I have something messed up?
On my laptop with Core i3, Win 8.1 and DMD 2.067, "dmd hi.d" takes 0.64 seconds to produce a 32-bit exe. No antivirus installed (built-in one disabled).
May 11 2015