Re: Request for comments on simple Ada program
- From: "jimmaureenrogers@xxxxxxxxxxxxxxxx" <jimmaureenrogers@xxxxxxxxxxxxxxxx>
- Date: 16 Nov 2005 06:46:03 -0800
tmoran@xxxxxxx wrote:
> >using a packed array of boolean. The space savings from packing
> >the array will frequently result in an array that will be kept in the
> >CPU cache.
> >
> >Even though it is less efficient to access individual bits, the program
> >execution speed, by my measurements, will increase by a factor of
> >approximately 3. The execution advantage is explained by the lack
> >of I/O overhead to off-cpu memory.
> I'm surprised. What size cache do you have and what value of Upper
> did you use for timing?
My timings were done on a similar program which can be found at
http://shootout.alioth.debian.org/benchmark.php?test=nsieve&lang=gnat&id=0
My home system has an AMD 64 3400+ processor with 512 Mb L2 cache.
I ran my tests using Win XP Service Pack 1.
The program takes input from the command line and calculates 3
different values of Upper. It simply reports the number of primes
calculated during the run. The output for a command line value
of '9' is:
PROGRAM OUTPUT
==============
Primes up to 5120000 356244
Primes up to 2560000 187134
Primes up to 1280000 98610
Jim Rogers
.
- Follow-Ups:
- Re: Request for comments on simple Ada program
- From: tmoran
- Re: Request for comments on simple Ada program
- From: Martin Dowie
- Re: Request for comments on simple Ada program
- References:
- Re: Request for comments on simple Ada program
- From: jimmaureenrogers@xxxxxxxxxxxxxxxx
- Re: Request for comments on simple Ada program
- From: tmoran
- Re: Request for comments on simple Ada program
- Prev by Date: Re: Request for comments on simple Ada program
- Next by Date: Re: Request for comments on simple Ada program
- Previous by thread: Re: Request for comments on simple Ada program
- Next by thread: Re: Request for comments on simple Ada program
- Index(es):
Relevant Pages
|
Loading