Skip to content
Prev 82791 / 398506 Next

getting faster results

It can depend on a whole list of things why the computations were taking so
long, and just saying what methods you are using to do the computation is
far from sufficient, as there are efficient ways and inefficient ways to do
any computations, and we don't know how you did any of them.  With the
little information you gave, you cannot honestly expect much help.  All
anyone can give you is generic advise.  Mine is as follows:\

- R has profiling facility that tells you what part(s) of the computation is
taking the most time.  Use it.  (See ?Rprof.)

- If you see (or hear) lots of disk activity, but fairly low CPU usage, you
might be short in physical memory, and R is using virtual memory, which will
be _very_ slow.

- Given the same hardware, there's little difference in performance between
different OSes, although Linux seems to have an edge.  Compilers used can
also make a difference. 

- Hardware can make a large difference.  On some analyses I did, running the
same code on an Opteron box running 64-bit Linux (SLES) was over six times
faster than on my Pentium M laptop.

Andy

From: Elizabeth Lawson