Re: Build time

2021-08-08 Thread Vladimir Panteleev via Digitalmars-d-learn
On Friday, 23 July 2021 at 18:53:06 UTC, JG wrote: Any suggestion on how to try and improve the build time. You could try some of the tools listed on the wiki for build time profiling: https://wiki.dlang.org/Development_tools#Build_time_profiling (intentional bump to aid search results, as

Re: Build time

2021-07-24 Thread russhy via Digitalmars-d-learn
One thing to add: With LDC you can add this flag ``-linkonce-templates`` to get faster link time when using templates a lot

Re: Build time

2021-07-24 Thread russhy via Digitalmars-d-learn
On Saturday, 24 July 2021 at 09:12:15 UTC, JG wrote: On Saturday, 24 July 2021 at 08:26:39 UTC, JG wrote: On Friday, 23 July 2021 at 20:03:22 UTC, Dennis wrote: On Friday, 23 July 2021 at 18:53:06 UTC, JG wrote: [...] You can try profiling it with LDC 1.25 or later. Add this to dub.sdl: [

Re: Build time

2021-07-24 Thread Adam D Ruppe via Digitalmars-d-learn
On Saturday, 24 July 2021 at 09:12:15 UTC, JG wrote: the slowest parts are in library code This is really common. A lot of libraries do really weird things... if you want to keep quick builds it is best to use the language directly.

Re: Build time

2021-07-24 Thread JG via Digitalmars-d-learn
On Saturday, 24 July 2021 at 09:12:15 UTC, JG wrote: On Saturday, 24 July 2021 at 08:26:39 UTC, JG wrote: On Friday, 23 July 2021 at 20:03:22 UTC, Dennis wrote: [...] Thanks for this suggestion. Unfortunately this makes the compile use too much memory for my system and so it gets killed bef

Re: Build time

2021-07-24 Thread JG via Digitalmars-d-learn
On Saturday, 24 July 2021 at 08:26:39 UTC, JG wrote: On Friday, 23 July 2021 at 20:03:22 UTC, Dennis wrote: On Friday, 23 July 2021 at 18:53:06 UTC, JG wrote: [...] You can try profiling it with LDC 1.25 or later. Add this to dub.sdl: [...] Thanks for this suggestion. Unfortunately this

Re: Build time

2021-07-24 Thread JG via Digitalmars-d-learn
On Friday, 23 July 2021 at 20:03:22 UTC, Dennis wrote: On Friday, 23 July 2021 at 18:53:06 UTC, JG wrote: [...] You can try profiling it with LDC 1.25 or later. Add this to dub.sdl: [...] Thanks for this suggestion. Unfortunately this makes the compile use too much memory for my system a

Re: Build time

2021-07-23 Thread Adam D Ruppe via Digitalmars-d-learn
On Friday, 23 July 2021 at 19:09:02 UTC, JG wrote: I am not sure how relevant it is but it is a compiler that I have been writing, not something serious (yet - if ever). Compile time optimizations are a bit weird compared to runtime ones - things that would fast at run time may actually be ver

Re: Build time

2021-07-23 Thread Adam D Ruppe via Digitalmars-d-learn
On Friday, 23 July 2021 at 19:32:08 UTC, H. S. Teoh wrote: And avoid doing too much work in CTFE, which is known to be slow. Well it very much depends HOW you do it. Like the ~= operation in ctfe is awfully slow and wastes a lot of memory depending on the size of the string, but if you preall

Re: Build time

2021-07-23 Thread Dennis via Digitalmars-d-learn
On Friday, 23 July 2021 at 18:53:06 UTC, JG wrote: Any suggestion on how to try and improve the build time. I am currently using dub. You can try profiling it with LDC 1.25 or later. Add this to dub.sdl: ``` dflags "--ftime-trace" platform="ldc" dflags "--ftime-t

Re: Build time

2021-07-23 Thread H. S. Teoh via Digitalmars-d-learn
ng > more than 15GB memory. I tried using lowmem and that did solve the > memory problem but the compile still takes around 1 minute. Any > suggestion on how to try and improve the build time. I am currently > using dub. 3000 loc and 1 minute build time? Sounds like you're using

Re: Build time

2021-07-23 Thread JG via Digitalmars-d-learn
On Friday, 23 July 2021 at 18:57:46 UTC, Adam D Ruppe wrote: On Friday, 23 July 2021 at 18:53:06 UTC, JG wrote: The program I writing is around 3000 loc what's the code? I am not sure how relevant it is but it is a compiler that I have been writing, not something serious (yet - if ever).

Re: Build time

2021-07-23 Thread Adam D Ruppe via Digitalmars-d-learn
On Friday, 23 July 2021 at 18:53:06 UTC, JG wrote: The program I writing is around 3000 loc what's the code?

Build time

2021-07-23 Thread JG via Digitalmars-d-learn
but the compile still takes around 1 minute. Any suggestion on how to try and improve the build time. I am currently using dub. Of course one could try to use fewer templates and less meta programming but that seems to defeat the purpose of using d.

Re: x64 build time 3x slower?

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
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 an

Re: x64 build time 3x slower?

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
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

Re: x64 build time 3x slower?

2017-08-07 Thread Moritz Maxeiner via Digitalmars-d-learn
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 t

x64 build time 3x slower?

2017-08-07 Thread Johnson Jones via Digitalmars-d-learn
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