From: Frank Piron <nospam@konad.net>
Subject: Re: Variant vs. Tagged Type
Date: Thu, 06 Nov 2003 08:22:03 +0100
Date: 2003-11-06T08:22:03+01:00 [thread overview]
Message-ID: <oprx7f21t8z12uz9@news.onlinehome.de> (raw)
In-Reply-To: xCaqb.1543$Z25.724@newsread4.news.pas.earthlink.net
Am Wed, 05 Nov 2003 17:40:45 GMT hat Jeffrey Carter <spam@spam.com>
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 <TYPE>'Class
>> what can be said about the runtime performance
>> of the expression
>> A(I).<component>?
>
> 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
prev parent reply other threads:[~2003-11-06 7:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-05 12:30 Variant vs. Tagged Type Frank Piron
2003-11-05 12:49 ` Marin David Condic
2003-11-05 14:50 ` Steve
2003-11-05 17:40 ` Jeffrey Carter
2003-11-06 7:22 ` Frank Piron [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox