comp.lang.ada
 help / color / mirror / Atom feed
From: Tapio Kelloniemi <spam18@thack.org>
Subject: Re: The Computer Language Shootout Benchmarks
Date: Wed, 03 May 2006 10:12:03 GMT
Date: 2006-05-03T10:12:03+00:00	[thread overview]
Message-ID: <Tl%5g.9264$dV6.1269@reader1.news.jippii.net> (raw)
In-Reply-To: 1146609438.780280.217330@g10g2000cwb.googlegroups.com

"Matthew Heaney" <mheaney@on2.com> wrote:
>Tapio Kelloniemi wrote:
>>
>> Since the compiler is most likely GNAT, there are always the
>> GNAT.[Dynamic_]HTable packages. I assume they are also faster than
>> Ada.Containers.Hashed_Maps would be.
>
>And why do you assume that???

Because GNAT.[Dynamic_]HTable has been designed to be extremely efficient.
Note that this is just an assumption, I have not read the code of GNAT's
HTable implementation, but at least GNAT.Dynamic_Tables is more efficient
than Ada.COntainers.Vectors since it does not use controlled types, it allows
direct access to the data structure and it uses realloc to resize the table.
When Ada.Containers container is resized, new memory must be allocated, data
must be copied and the old memory must be freed. Realloc may avoid this.

However, my opinion is that Ada.Containers is much more convenient and also
safer.

-- 
Tapio



  reply	other threads:[~2006-05-03 10:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-02 17:33 The Computer Language Shootout Benchmarks Martin Krischik
2006-05-02 18:39 ` jimmaureenrogers
2006-05-03 16:03   ` Martin Krischik
2006-05-04 16:48     ` Martin Krischik
2006-05-04 18:20       ` tmoran
2006-05-05  8:10       ` Craig Carey
2006-05-05 18:15         ` Martin Krischik
2006-05-06 11:00           ` Craig Carey
2006-05-06 19:00           ` tmoran
2006-05-06  7:00       ` igouy
2006-05-07  9:56         ` Martin Krischik
2006-05-06  6:57     ` igouy
2006-05-02 19:14 ` Gautier
2006-05-04  2:01   ` Craig Carey
2006-05-04  3:16     ` Craig Carey
2006-05-06  7:34       ` igouy
2006-05-06 11:29         ` Craig Carey
2006-05-06 16:01           ` igouy
2006-05-08 13:24             ` Marc A. Criley
2006-05-09  5:23               ` Craig Carey
2006-05-02 21:32 ` Tapio Kelloniemi
2006-05-02 22:37   ` Matthew Heaney
2006-05-03 10:12     ` Tapio Kelloniemi [this message]
2006-05-03 14:55       ` Matthew Heaney
2006-05-03 16:15         ` Martin Krischik
2006-05-03 17:11         ` Tapio Kelloniemi
2006-05-03 16:05   ` Martin Krischik
2006-05-03  0:12 ` Matthew Heaney
2006-05-03 16:05   ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox