Re: PI program again



On Sep 7, 7:53 pm, user923005 <dcor...@xxxxxxxxx> wrote:
On Sep 7, 5:05 pm, mike3 <mike4...@xxxxxxxxx> wrote:





On Sep 7, 5:11 pm, user923005 <dcor...@xxxxxxxxx> wrote:

On Sep 7, 11:29 am, mike3 <mike4...@xxxxxxxxx> wrote:

On Sep 4, 12:49 pm, mike3 <mike4...@xxxxxxxxx> wrote:

Hi.

I noticed I haven't gotten many more answers on the thread "Fast pi
program?" about the pi program. I'd really be curious to know if
specifically the multiplication routines can be made faster than
what's already in there (since that's what seems to be taking up most
of the time according to the profiler. Not that I'm surprised.). The
source code file is still available for download.

Any answer?

It's a fairly interesting topic. But I found your license confusing
and the first time I tried it, there were too many problems to
continue.

Just profile it, and speed up the hot spots.

My license agreement was confusing? Could you explain,
please? I was just saying that you shouldn't redistribute
the program or any modified version without my permission,
as I was just releasing it for help with the speed, not a "full"
release. If I do go with a full release, then I will probably
release under a more relaxed license.

What were the problems you had when you tried it? You
were using GNU GCC to compile weren't you? Also, did
you get the most recent download, which does *not* use
a time zone library called "libtz"? If not, and that is related
to your problem, then you can get the new download here:

http://www.mediafire.com/?9mzltzjyizn

By the way I already profiled with gprof, and the hot spots
seem to be the multiplication routines, by the way, with the
FFTs/NTTs and all that. I'd also like some advice on the disk
math routines as I'm not sure if they could be improved
or not in terms of performance

I can build it with gcc:
dcorbit@DCORBIT64 /c/junk/pisrc
$ make
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c nttxfm.c
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c crt.c
primes.h:18: warning: 'NTTroots' defined but not used
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c bigmul.c
crtmath.h:22: warning: 'crtcopy32' defined but not used
crtmath.h:53: warning: 'crtmulbsm32' defined but not used
crtmath.h:108: warning: 'crtmod32' defined but not used
primes.h:18: warning: 'NTTroots' defined but not used
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c blockint.c
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c diskint.c
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c newton.c
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c agm.c
gcc -g -pg -O3 -Wall -ffast-math -funroll-loops -c pib26.c
gcc -g -pg -o pib26 nttxfm.o crt.o bigmul.o blockint.o diskint.o
newton.o agm.o pib26.o -lm

but my best profiler tools are Windows based (Intel's VTUNE and
Microsoft's Profiler that comes with the Enterprise version of their
tool set).

Since your file is chock full of inline assembly in GAS syntax, there
is little hope of compiling it successfully using the Intel or MSVC++
compilers.


I suppose I could rewrite the AT&T syntax (it's not called "GAS"
syntax)
assembler in Intel syntax, but since I was working with gcc, I
did not do it. I use gcc since I do not have the money to buy those
other compilers you mentioned.

The things I could find with the gprof are the same things that you
found so I doubt that I can be of any help.

So you don't think gprof is a good enough profiler, then? And I'd
bet that Enterprise edition of the Microsoft stuff would probably
cost sweet amounts of money I don't have.

And why couldn't the results from gprof be of any help,
anyways?


.



Relevant Pages

  • Re: request for some help in testing specific code
    ... I would like to know what as many compilers as possible do with some specific ... syntax. ... disallow it, but I ... Micro Focus Server Express V4.0 gives no error or warning. ...
    (comp.lang.cobol)
  • Re: PROBLEM
    ... tmp.c:1: warning: initialization discards qualifiers from pointer ... The problem with C compilers is that these options are not enabled ... Compiling new C code in a mode that flags possible writes to string ... become illegal if the language were modified to make string literals ...
    (comp.std.c)
  • Re: Warning: The structure contains misaligned fields
    ... end module test ... Warning: The structure contains one or more misaligned fields. ... You have specified SEQUENCE ... Some compilers have options to hide the warning ...
    (comp.lang.fortran)
  • Re: Warning: The structure contains misaligned fields
    ... end module test ... If you read he words it says WARNing. ... You have specified SEQUENCE ... Some compilers have options to hide the warning ...
    (comp.lang.fortran)
  • Re: PI program again
    ... specifically the multiplication routines can be made faster than ... of the time according to the profiler. ... were using GNU GCC to compile weren't you? ... crtmath.h:22: warning: 'crtcopy32' defined but not used ...
    (comp.programming)