HadrienG2 / crofiler

A better visualization of clang's -ftime-trace output
13 stars 3 forks source link

Automatically generate explicit template instantiations #123

Open HadrienG2 opened 4 months ago

HadrienG2 commented 4 months ago

In practice, the most common way to resolve template bloat in Acts has been to outsource some of it to a separate source file. One standard way to do it in C++ is explicit instantiations + extern template. Could crofiler automatically generate some of this boilerplate?

HadrienG2 commented 4 months ago

One argument against this is that explicit template instantiations still represent some amount of duplicate work (one copy of the template's code per instance), which can be eliminated entirely if one switches to an inheritance-based design. This is what has usually been done in Acts.