Does template class/function specialization improves compilation/linker speed?
- by Stormenet
Suppose the following template class is heavily used in a project with mostly int as typename and linker speed is noticeably slower since the introduction of this class.
template <typename T>
class MyClass
{
void Print()
{
std::cout << m_tValue << std::endl;;
}
T m_tValue;
}
Will defining a class specialization benefit compilation speed?
eg.
void MyClass<int>::Print()
{
std::cout << m_tValue << std::endl;
}