PDA

View Full Version : When to use templates thinking in the speed of the program.



tonnot
22nd June 2011, 10:41
I have read :
"At that moment, when an instantiation is required, the compiler generates a function specifically for those arguments from the template."
So, I think that is not very good idea to use a template for a function I'm going so uses 100.000 times ?
Any advice ? Thanks

wysota
22nd June 2011, 10:43
A template is instantiated at compile time. It has no influence on run time.