From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,56131a5c3acc678e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-07 21:54:37 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!washdc3-snh1.gtei.net!news.gtei.net!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!newshosting.com!news-xfer2.atl.newshosting.com!diablo.voicenet.com!cycny01.gnilink.net!cyclone1.gnilink.net!wn12feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Question about OO programming in Ada From: James Rogers References: <5JmdnUF_9o_ABE-iRTvUrg@rapidnet.com> Message-ID: User-Agent: Xnews/5.04.25 Date: Mon, 08 Dec 2003 05:54:37 GMT NNTP-Posting-Host: 12.73.184.41 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1070862877 12.73.184.41 (Mon, 08 Dec 2003 05:54:37 GMT) NNTP-Posting-Date: Mon, 08 Dec 2003 05:54:37 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:3217 Date: 2003-12-08T05:54:37+00:00 List-Id: Hyman Rosen wrote in news:PuSAb.1600$kz2.1416@nwrdny01.gnilink.net: > James Rogers wrote: >> Is this done using templates? Templates do incur an overhead. The >> overhead is incurred at compile time rather than at run time, but >> there is still an overhead. > > What does it mean to incur a compile-time overhead? The computations are performed at compile time. The casually observed overhead is a longer compile time. My point was that any computations done using the C++ template language require some computation resources by the computer. No computations happen without associated CPU cycles. On the other hand, a computation done at compile time is done once. A computation done at run-time is done each time the code block containing the computation is executed. This makes the use of templates very efficient, but not free. Jim Rogers