> it doesn't have to generate a whole bunch of templated functions and then optimize down to the ones that actually get used.
It's been a long time since I've dealt with templated C++, but I thought this was how C++ does it too.
C++ will only generate functions for template parameters that are actually used, because it compiles a version of the templated function for each unique template parameters.