Faster linker

bennygui bennygui at nowhere.com
Fri Nov 9 02:47:38 UTC 2018


On Friday, 9 November 2018 at 02:33:42 UTC, Steven Schveighoffer 
wrote:
> Yeah, a vibe.d project with diet templates takes most of its 
> time in the linker, I've found. Basically a big hang after dub 
> prints:
>
> Linking...

Yep, that's it.

>
> I suspect the issue is not exactly the linker, but the symbol 
> name sizes again (probably related to the diet templates). I 
> haven't looked into it enough to see where the problem is 
> coming from, but one of either vibe.d using naming tricks to 
> limit the name size, or D doing something clever with string 
> template parameters should help.
>

I've tried commenting out all "render" call so I have no diet 
templates and I save 1 second of total time (10.5 to 9.6) and 
it's still the linker that takes all the time.

I looked at the gold linker and it's already a possible 
configuration with Gentoo Linux! I've switched and it now 
compiles and link in 4 seconds! Yah!

But I don't want to switch my whole system to use gold, is there 
a way to configure dub or dmd to use usr/bin/ld.gold instead of 
/usr/bin/ld ?

Thanks!


More information about the Digitalmars-d mailing list