From andy_liaw at merck.com  Mon Apr  5 15:56:01 2004
From: andy_liaw at merck.com (Liaw, Andy)
Date: Mon Apr  5 15:56:30 2004
Subject: [Rd] speed difference between pgf77 and g77 on amd64
Message-ID: <3A822319EB35174CA3714066D590DCD504AF7B22@usrymx25.merck.com>

For those interested:

I compiled R-1.9.0beta_2004-04-02 with pgf77/gcc/g++ and g77/gcc/g++, both
_without_ fast BLAS.  Both passed make check-all.  Simple crossprod(m) for
fairly large `m' shows that the version compiled with pgf77 is about 15%
faster:

[andy@leo:scratch]% echo "set.seed(1); m <- matrix(runif(5e7), 1e4); gc();
system.time(crossprod(m))" | R-1.9.0-PGI/bin/R --slave -q
           used  (Mb) gc trigger   (Mb)
Ncells   431805  23.1     741108   39.6
Vcells 50125266 382.5  150395933 1147.5
[1] 671.14   0.30 762.35   0.00   0.00

[andy@leo:scratch]% echo "set.seed(1); m <- matrix(runif(5e7), 1e4); gc();
system.time(crossprod(m))" | R-1.9.0-GCC/bin/R --slave -q
           used  (Mb) gc trigger   (Mb)
Ncells   431805  23.1     741108   39.6
Vcells 50125266 382.5  150395933 1147.5
[1] 777.55   0.40 882.37   0.00   0.00

I'd welcome comments and suggestions on code for further comparison.  I will
also keep trying to compile R with pgcc/pgCC and see if further gain is
possible.

Best,
Andy
--
Andy Liaw, PhD
Biometrics Research      PO Box 2000, RY33-300     
Merck Research Labs           Rahway, NJ 07065
mailto:andy_liaw@merck.com        732-594-0820


[Rd] speed difference between pgf77 and g77 on amd64
Liaw, Andy