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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,abbaab2e39561193 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-05 23:22:17 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed.stueberl.de!npeer.de.kpn-eurorings.net!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Frank Piron Newsgroups: comp.lang.ada Subject: Re: Variant vs. Tagged Type Date: Thu, 06 Nov 2003 08:22:03 +0100 Organization: KonAd GmbH Message-ID: References: NNTP-Posting-Host: p508b407f.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-Trace: online.de 1068103337 30021 80.139.64.127 (6 Nov 2003 07:22:17 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Thu, 6 Nov 2003 07:22:17 +0000 (UTC) User-Agent: Opera7.11/Win32 M2 build 2887 Xref: archiver1.google.com comp.lang.ada:2122 Date: 2003-11-06T08:22:03+01:00 List-Id: Am Wed, 05 Nov 2003 17:40:45 GMT hat Jeffrey Carter geschrieben: > Frank Piron wrote: > >> is it possible to make some general statements >> concerning the alternative variant vs. tagged >> type with respect to runtime performance? >> For example: >> if we have an array A 1) of type access to a variant >> 2) of type access 'Class >> what can be said about the runtime performance >> of the expression >> A(I).? > > It sounds as if you're engaging in premature optimization (the root of > all evil). Do it whichever way is best suited to the problem, and see if > the result is fast enough. 99.99% of the time, the microsecond > differences you're worrying about don't make a difference. > Currently i'm working on an ORACLE access library on top of oci. Yesterday i've done some benchmark tests. I experienced differences in runtime performance up to a factor of 4 while fetching and extracting 10_000 rows in using a variant instead of an array of class wide pointers for the db_row_type. The compiler is gnat 3.15p on windows. Fortunately ada gives alternatives ;-) Frank