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,4cf1fd41f64f8f02 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!newscon02.news.prodigy.com!prodigy.net!atl-c08.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: task-safe hash table? References: From: Stephen Leake Date: Sun, 04 Jun 2006 08:55:47 -0400 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:YA7DHMms1gqT/b4wivMxcG9Q/Qg= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 865004482d85de73ae4a420717 Xref: g2news2.google.com comp.lang.ada:4672 Date: 2006-06-04T08:55:47-04:00 List-Id: tmoran@acm.org writes: >> > the overhead of making it Protected would probably kill the gain. >> >> What "overhead"? > In a trivial single-tasking test program on my machine, a call to a > Protected function compiled with Gnat 3.15p -O2 takes > 0.304697000 mics while a call to a regular function takes > 0.022779000 microseconds. Interesting. Please post the program; I'll run it with a later GNAT, and if the results are still so bad, submit a bug report. > Using -O3, it's 0.291347000 mics while a call to a regular function > takes 0.001893000 microseconds. -O3 does inlining, so the function call overhead probably disappeared. But I'd have to see the Ada and assembly code to be sure. -- -- Stephe