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-Thread: 103376,23c85e456e18d6b5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.glorb.com!feeder1.news.jippii.net!reader1.news.jippii.net!53ab2750!not-for-mail From: Tapio Kelloniemi Subject: Re: The Computer Language Shootout Benchmarks References: <1146609438.780280.217330@g10g2000cwb.googlegroups.com> Newsgroups: comp.lang.ada Message-ID: Date: Wed, 03 May 2006 10:12:03 GMT NNTP-Posting-Host: 217.30.176.187 X-Complaints-To: newsmaster@saunalahti.com X-Trace: reader1.news.jippii.net 1146651123 217.30.176.187 (Wed, 03 May 2006 13:12:03 EEST) NNTP-Posting-Date: Wed, 03 May 2006 13:12:03 EEST Organization: Saunalahti Customer Xref: g2news2.google.com comp.lang.ada:4028 Date: 2006-05-03T10:12:03+00:00 List-Id: "Matthew Heaney" 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