* baibaichen:
i know that pImpl idiom can decrease compile time, but Is there any
good practice/idiom to decrease link time?
Yes, the same as in general programming: divide and conquer.
If you're linking some hundreds of object files you have packaging problem:
repackage in smaller libraries (this may require some redesign; packaging
can affect design and vice versa). Use the appropriate options and/or tools
to optimize your libraries for fast access. E.g., under *nix, run 'ranlib'.
If you're linking some hundreds of libraries you also have a packaging
problem: repackage in smaller executables and dynamic libraries (this may
require some redesign; packaging can affect design and vice versa).
Of course this has only tangentially to do with current C++ as a language.
But, to the degree usage of the language is affected and hindered by tool
usage I think at least this kind of high level advice is on-topic. However,
be aware that concrete tool usage issues are rarely or not ever on-topic in
this group. This group is concerned with the C++ _language_.