comp.lang.ada
 help / color / mirror / Atom feed
From: "Steve Whalen" <SteveWhalen001@hotmail.com>
Subject: Re: task-safe hash table?
Date: 5 Jun 2006 14:57:16 -0700
Date: 2006-06-05T14:57:16-07:00	[thread overview]
Message-ID: <1149544635.972350.169450@h76g2000cwa.googlegroups.com> (raw)
In-Reply-To: UJOdncpJU9SkAB3ZnZ2dnUVZ_vqdnZ2d@comcast.com

tmoran@acm.org wrote:
> > > 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.
> Using -O3, it's
> 0.291347000 mics while a call to a regular function takes
> 0.001893000 microseconds.

When I run your program on a Linux Debian Sarge server with a vanilla
install of GNAT 3.15p with a slow 450mhz Pentium (and no other load) I
get:

==> compiled with no optimization <==
     a 0.076000000 mics
     b 0.075000000 mics
     c 0.073000000 mics
prot.a 3.590000000 mics
prot.b 2.480000000 mics
prot.c 1.710000000 mics

==> compiled with O2 optimization <==
     a 0.064000000 mics
     b 0.041000000 mics
     c 0.041000000 mics
prot.a 3.726000000 mics
prot.b 2.356000000 mics
prot.c 1.586000000 mics

==>  compiled with O3 optimization  <==
     a 0.017000000 mics
     b 0.017000000 mics
     c 0.006000000 mics
prot.a 3.820000000 mics
prot.b 2.369000000 mics
prot.c 1.865000000 mics

So the relationship between optimization levels looks materially the
same, as does the overhead of protected mode.

Steve




  parent reply	other threads:[~2006-06-05 21:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-29 21:42 task-safe hash table? tmoran
2006-05-29 22:56 ` John
2006-05-30  0:18   ` tmoran
2006-05-30  3:50     ` John
2006-05-30  4:35       ` tmoran
2006-05-30  9:50         ` Georg Bauhaus
2006-06-01  6:32   ` Simon Wright
2006-06-01 19:30     ` tmoran
2006-06-01 20:03       ` Ludovic Brenta
2006-06-01 20:07       ` Dmitry A. Kazakov
2006-06-02  4:31         ` Jeffrey R. Carter
2006-06-02 10:36         ` Stephen Leake
2006-06-03  6:50         ` tmoran
2006-06-03 20:40           ` tmoran
2006-06-02 10:35       ` Stephen Leake
2006-06-02 20:19         ` tmoran
2006-06-03 21:10           ` M E Leypold
2006-06-04  0:23             ` tmoran
2006-06-04 12:55           ` Stephen Leake
2006-06-04 17:22             ` tmoran
2006-06-08  1:10               ` Stephen Leake
2006-06-11 13:29               ` Georg Bauhaus
2006-06-04 17:48             ` Simon Wright
2006-06-05  0:23               ` tmoran
2006-06-05 21:57           ` Steve Whalen [this message]
2006-06-06 11:10             ` Ole-Hjalmar Kristensen
2006-05-30 15:00 ` Matthew Heaney
replies disabled

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