Re: [S] Avoid for loops !!!

Prof Brian D Ripley (ripley@stats.ox.ac.uk)
Thu, 19 Nov 1998 07:31:26 +0000 (GMT)


On Wed, 18 Nov 1998, Brian Beckage wrote:

>
> I've had similar problems using the new Splus 5 on a sun station. But
> when I ran the same code using Splus 3.3, it ran fine and never exceeded
> 40MB. So it appears that 5.0 may have some memory leak problems.

[The international space station is due for first launch today!]

Hmm. As someone running S-PLUS on a mere Sun UltraSparc I may have fewer
resources, but for me S-PLUS 5 takes more than 40Mb virtual memory to get
started (46Mb just now), and the experiments Bill Venables and I showed at
our Washington course

[http://www.stats.ox.ac.uk/pub/bdr/Washington98]

show that the memory usage of 5.0 is quite different from 3.4, so that what
is memory-efficient coding is not in the other. But that extra 40Mb or so
to start with means that you need a large amount of memory before 5.0 wins
in most problems.

I think your conclusion (memory leaks) is a leap in the dark, but 5.0
does use more resources for small problems than 3.4, and when I asked
someone at MathSoft what was meant by large he said `tens of thousands of
observations'.

As for the original question (avoid for loops) there really is a lot
written about it, not least by Bill and I in our book, our on-line
complements and that course.

Brian

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

----------------------------------------------------------------------- This message was distributed by s-news@wubios.wustl.edu. To unsubscribe send e-mail to s-news-request@wubios.wustl.edu with the BODY of the message: unsubscribe s-news