template classes faster than derived classes?

Nava Whiteford new@sgenomics.org
Tue Nov 24 19:44:00 GMT 2009


Hi,

Are template classes faster than using a virtual derived class via a
pointer to its base class?

Intuition tells me it should be faster, and reasonably significantly so.
However I put together the following test:

http://linuxjunk.blogspot.com/2009/11/are-templates-faster-than-subclasses.html

Which suggests to me that there isn't really a lot in it.

I'd welcome any comments on this.

Nav



More information about the Gcc-help mailing list