Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Templates and Generics - Effects on Performance?

Status
Not open for further replies.

netprik1

Programmer
Jul 19, 2007
7
US
Could anyone tell me how, if at all, templates and generics affect code speed. I know that it depends on the kind of code, but my main question is whether using templates instead of actually having an implementation for each type, slows down the code at all. Or is all the work done at compile time, with the compiler covertly creating a separate declaration for every type used with a template or generic? Are templates and generics the same in terms of performance?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top