-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Zeljko Vrba Sent: 29 June 2007 08:40 To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Test] Testing generated code.
On Fri, Jun 29, 2007 at 02:05:59AM -0500, Michael Marcin wrote:
There is a senior engineer that I work with who believes
templates are
slow and prefers to write C or assembly routines. The templates are slow
There is some interesting evidence (don't have web address) that shows that templates are actually considerably faster than some of the standard C library functions (i.e. qsort vs std:: sort functions). This is because templates are optimised to the actual type when in many cases the standard C functions (although written in assembler) have to have extra code (and therefore are slower) to handle more generic types. Obviously, the exact differences will depend on the type of code being used. Try google searches on this - I was surprised at the difference - perhaps your senior engineer will be also!! James This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately.