Another observation:
wc -l test.dep (for "-deps=test.dep ... -unittest -main" command):
Linux 2.076.1: 41389
Linux 2.069.1: 144

Making small changes to 2.069.1 runtimes (I had run with a different program by mistake. The measurement is still of the same order)

On Wednesday, 11 October 2017 at 06:25:19 UTC, Dhananjay wrote:
Hello,

I am upgrading to DMD 2.076.1 from DMD 2.069.2 (similar results on 2.075.1), and seeing a huge increase in unittest compilation time when the -deps parameter is also passed to dmd. This is on both OSX and linux. What can be the cause of this?

Sample program:

    import std.stdio: writeln;

    unittest { writeln("TestUT"); }

    version (unittest) {}
    else
    {
        void main()
        {
            writeln("TestMain");
        }
    }

Observations:

Command: time dmd -deps=test.dep -c -o- test.d -de -w -m64 -color -g -debug -gs -unittest -main
Linux runtime: user 0m28.192s    << Note the increase
OSX runtime: user 0m48.508s     <<
    Linux 2.069.1 runtime: user 0m0.045s <edited>

Command: time dmd -c -o- test.d -de -w -m64 -color -g -debug -gs -unittest -main
Linux runtime: user 0m0.064s
OSX runtime: user 0m0.090s
   Linux 2.069.1 runtime: user 0m0.053s <edited>

Command: time dmd -deps=test.dep -c -o- test.d -de -w -m64 -color -g -debug -gs
Linux runtime: user 0m0.584s
OSX runtime: user 0m0.882s
  Linux 2.069.1 runtime: user 0m0.035s  <edited>

Command: time dmd -c -o- test.d -de -w -m64 -color -g -debug -gs
Linux runtime: user 0m0.048s
OSX runtime: user 0m0.074s
  Linux 2.069.1 runtime: user 0m0.036s   <edited>

Environment:
OSX: El Capitan 10.11.6
Linux with DMD 2.076.1: Gentoo 4.9.34
Linux with DMD 2.069.1: Centos 7


Reply via email to