|Templates in C++ email@example.com (1995-05-11)|
|Re: Templates in C++ firstname.lastname@example.org (1995-05-12)|
|Re: Templates in C++ email@example.com (1995-05-12)|
|Re: Templates in C++ firstname.lastname@example.org (1995-05-12)|
|Re: Templates in C++ email@example.com (1995-05-14)|
|Re: Templates in C++ davidm@flora.Rational.com (1995-05-16)|
|Re: Templates in C++ firstname.lastname@example.org (Greg Morrisett) (1995-05-17)|
|[7 later articles]|
|From:||email@example.com (Jeffrey Cohen)|
|Keywords:||C++, performance, question, comment|
|Organization:||Cornell Theory Center|
|Date:||Thu, 11 May 1995 14:48:17 GMT|
With all this discussion of the performance differences between
C and C++, I didn't see one reference to C++ templates. How does
this effect performance? Is the performance highly dependent on
the compiler used or are the algorithms for compilation similar
across compilers? Do these problems get worse when templates
are used recursivly? As parent classes? With multiple parameters.
As an example. If you were generating a matrix class, would better
code be generated through a generic class or by using a template
class that has two integers. I think it should be the template
class since the bounds are known and the compiler can better
optimise the code. Is this true and why?
Jeffrey David Cohen
finger or www for pgp key
[I was under the impression that the biggest practical problem with templates
is avoiding redundant instantiation when you have separately compiled modules.
Other than that, they act very much like macros, which don't present great
compiling problems. -John]
Return to the
Search the comp.compilers archives again.