vectorization of a simple loop -- not in DMD?

Siarhei Siamashka siarhei.siamashka at gmail.com
Tue Jul 12 07:06:37 UTC 2022


On Monday, 11 July 2022 at 22:16:05 UTC, ryuukk_ wrote:
> LDC clean full rebuild
> ```
> $ time dub build -f --compiler=ldc2
> Performing "debug" build using ldc2 for x86_64.
> game ~master: building configuration "desktop"...
> Linking...
>
> real    0m18.033s
> user    0m0.000s
> sys     0m0.015s
> ```
>
> DMD clean full rebuild
> ```
> $ time dub build -f --compiler=dmd
> Performing "debug" build using dmd for x86_64.
> game ~master: building configuration "desktop"...
> Linking...
>
> real    0m1.348s
> user    0m0.031s
> sys     0m0.015s
> ```

BTW, I'm very curious about investigating the reason for such 
huge build time difference, but can't reproduce it on my 
computer. For example, compiling the DUB source code itself via 
the same DUB commands only results in DMD showing roughly twice 
faster build times (which is great, but nowhere close to ~13x 
difference):

```
$ git clone https://github.com/dlang/dub.git
$ cd dub
```
```
$ time dub build -f --compiler=ldc2
Performing "debug" build using ldc2 for x86_64.
dub 1.29.1+commit.38.g7f6f024f: building configuration 
"application"...
Serializing composite type Flags!(BuildRequirement) which has no 
serializable fields
Serializing composite type Flags!(BuildOption) which has no 
serializable fields
Linking...

real	0m34.371s
user	0m32.883s
sys	0m1.488s
```
```
$ time dub build -f --compiler=dmd
Performing "debug" build using dmd for x86_64.
dub 1.29.1+commit.38.g7f6f024f: building configuration 
"application"...
Serializing composite type Flags!(BuildRequirement) which has no 
serializable fields
Serializing composite type Flags!(BuildOption) which has no 
serializable fields
Linking...

real	0m14.078s
user	0m12.941s
sys	0m1.129s

```

Is there an open source DUB package, which can be used to 
reproduce a huge build time difference between LDC and DMD?


More information about the Digitalmars-d-learn mailing list