Speed up `dub`.

ciechowoj via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 2 06:04:00 PDT 2016


On Thursday, 2 June 2016 at 12:20:50 UTC, Jacob Carlborg wrote:
> On 2016-06-01 23:33, ciechowoj wrote:
>> Hahahaa. Who could possibly think that `build.sh` builds dub 
>> in debug
>> mode? With -release -O -inline -m64 it runs 5 times faster : 
>> P. It made
>> my day...
>
> Haha really?

Yes, I should have done it at the beginning, but yesterday I 
decided to see what is really happening and compiled dub with 
`-profile` and found that an assert from `std/path.d:3168` 
(`globMatch`) contributes a major amount to the running time of 
dub.

```
     assert(balancedParens(pattern, '[', ']', 0));
     assert(balancedParens(pattern, '{', '}', 0));
```


More information about the Digitalmars-d-learn mailing list