Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It’s a bit orthogonal to monomorphization, but I believe C++ compilers can occasionally deduplicate identical template instantiations, where “identical” means they compile to the same assembly even though the types are different.


One next step that I don't think C++ compilers do yet is deduplicate functions that differ only in constants used or functions called. This could help with std::sort-style functions where the outer algorithm can work on generic pointers and only the comparison is a call to a different function.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: