gdc or ldc for faster programs?

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Jan 27 17:06:31 UTC 2022


On Thu, Jan 27, 2022 at 08:46:59AM -0800, Ali Çehreli via Digitalmars-d-learn wrote:
[...]
> I see that template instantiations are linked through weak symbols:
> 
> $ nm deneme | grep foo
> [...]
> 0000000000021380 W _D6deneme__T3fooTiZQhFNaNbNiNfZv
> 
> What I know is that weak symbols can be overridden by strong symbols
> during linking.
[...]

Yes, and it also means that only one copy of the symbol will make it
into the executable. This is one of the ways we leverage the linker to
eliminate (merge) duplicate template instantiations.


T

-- 
Claiming that your operating system is the best in the world because more people use it is like saying McDonalds makes the best food in the world. -- Carl B. Constantine


More information about the Digitalmars-d-learn mailing list