www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - x64 build time 3x slower?

reply Johnson Jones <JJ Dynomite.com> writes:
Why would that be. Program take about 4 seconds to compile and 12 
for x64. There is fundamentally no difference between the two 
versions. I do link in gtk x86 and gtk x64 depending on version, 
and that's it as far as I can tell.

Debug
x86         4
x64         12
Release
x86         3
x64         5

The timings are pretty steady.
Aug 07 2017
parent reply Moritz Maxeiner <moritz ucworks.org> writes:
On Monday, 7 August 2017 at 22:19:57 UTC, Johnson Jones wrote:
 Why would that be. Program take about 4 seconds to compile and 
 12 for x64. There is fundamentally no difference between the 
 two versions. I do link in gtk x86 and gtk x64 depending on 
 version, and that's it as far as I can tell.

 Debug
 x86         4
 x64         12
 Release
 x86         3
 x64         5

 The timings are pretty steady.
Split up the build time in compile time and link time and see how the difference is distributed between the two. If it's distributed overwhelmingly to the link time it could be that you're using Microsoft's linker for x64 and OPTLINK for x86?
Aug 07 2017
parent reply Johnson Jones <JJ Dynomite.com> writes:
On Monday, 7 August 2017 at 22:56:37 UTC, Moritz Maxeiner wrote:
 On Monday, 7 August 2017 at 22:19:57 UTC, Johnson Jones wrote:
 Why would that be. Program take about 4 seconds to compile and 
 12 for x64. There is fundamentally no difference between the 
 two versions. I do link in gtk x86 and gtk x64 depending on 
 version, and that's it as far as I can tell.

 Debug
 x86         4
 x64         12
 Release
 x86         3
 x64         5

 The timings are pretty steady.
Split up the build time in compile time and link time and see how the difference is distributed between the two. If it's distributed overwhelmingly to the link time it could be that you're using Microsoft's linker for x64 and OPTLINK for x86?
Yeah, I guess that is probably it. Forgot that two different linkers were used... although, Not much is being linked. Visual D doesn't split up the two easily, I suppose I can't separate them. It should probably do individual profiling between the two. Usually the build times are pretty close and I don't recall it being slow when I first started building, and my code hasn't changed much... But I did modify a few options such as debug diagnostics and such as those were causing visual studio to freeze. I guess I could perfmon it to see what exactly it is doing.
Aug 07 2017
parent Johnson Jones <JJ Dynomite.com> writes:
On Tuesday, 8 August 2017 at 00:01:05 UTC, Johnson Jones wrote:
 On Monday, 7 August 2017 at 22:56:37 UTC, Moritz Maxeiner wrote:
 On Monday, 7 August 2017 at 22:19:57 UTC, Johnson Jones wrote:
 Why would that be. Program take about 4 seconds to compile 
 and 12 for x64. There is fundamentally no difference between 
 the two versions. I do link in gtk x86 and gtk x64 depending 
 on version, and that's it as far as I can tell.

 Debug
 x86         4
 x64         12
 Release
 x86         3
 x64         5

 The timings are pretty steady.
Split up the build time in compile time and link time and see how the difference is distributed between the two. If it's distributed overwhelmingly to the link time it could be that you're using Microsoft's linker for x64 and OPTLINK for x86?
Yeah, I guess that is probably it. Forgot that two different linkers were used... although, Not much is being linked. Visual D doesn't split up the two easily, I suppose I can't separate them. It should probably do individual profiling between the two. Usually the build times are pretty close and I don't recall it being slow when I first started building, and my code hasn't changed much... But I did modify a few options such as debug diagnostics and such as those were causing visual studio to freeze. I guess I could perfmon it to see what exactly it is doing.
It takes about 3 seconds to write the map file(I have it generating cross references, not sure what it actually does but I thought it might help with debugging issues. I have it enabled for both x86 and x64. I thought I disabled it with no differences, but maybe I missed it). It takes another 4 seconds to create the pdb. But it seems that about 6 seconds are done doing thing 7:13:14.7148555 PM link.exe 9860 QueryStandardInformationFile C:\D\Libraries\x64\gtkd.lib SUC ESS AllocationSize: 84,443,136, EndOfFile: 84,439,450, NumberOfLinks: 1, DeletePending: False, Directory: False 7:13:14.7148665 PM link.exe 9860 CreateFileMapping C:\D\Libraries\x64\gtkd.l b SUCCESS SyncType: SyncTypeOther 7:13:15.7801685 PM ServiceHub.IdentityHost.exe 4952 Thread Exit SUCCESS Thread ID: 11224, User Time: 0.0000000, Kernel Time: 0.0000000 7:13:17.2481064 PM ServiceHub.VSDetouredHost.exe 5004 Thread Create SUCCESS Thread ID: 10976 7:13:17.4141043 PM devenv.exe 1040 Thread Create SUCCESS Thread ID: 11200 7:13:17.8990951 PM DParserCOMServer.exe 4492 Thread Create SUCCESS Thread ID: 9176 7:13:18.7481654 PM ServiceHub.VSDetouredHost.exe 5004 Thread Exit SUCCESS Thread ID: 10976, User Time: 0.0000000, Kernel Time: 0.0000000 7:13:18.9163321 PM devenv.exe 1040 Thread Exit SUCCESS Thread ID: 11200, User Time: 0.0000000, Kernel Time: 0.0000000 7:13:19.4011479 PM DParserCOMServer.exe 4492 Thread Exit SUCCESS Thread ID: 9176, User Time: 0.0000000, Kernel Time: 0.0000000 7:13:19.9681080 PM ServiceHub.VSDetouredHost.exe 5004 Thread Create SUCCESS Thread ID: 10416 Not sure what is happening in there but it seems like Visual D or Visual Studio issue rather than dmd ;/ I'll look in to it some more to see what I can find.
Aug 07 2017