Re: R-alpha: assignment scoping

Luke Tierney (luke@stat.umn.edu)
Fri, 31 May 1996 06:35:56 -0500 (CDT)


From: Luke Tierney <luke@stat.umn.edu>
Message-Id: <9605311135.AA16641@nokomis.stat.umn.edu>
Subject: Re: R-alpha: assignment scoping
To: ihaka@stat.auckland.ac.nz (Ross Ihaka)
Date: Fri, 31 May 1996 06:35:56 -0500 (CDT)
In-Reply-To: <199605310239.OAA08444@stat.auckland.ac.nz> from "Ross Ihaka" at May 31, 96 02:39:01 pm

Ross writes:
> 
> I personally feel that declarations are ultimately going to be needed,
> if only to clean up the language.  However, the efficiency gains to be
> had from compilation can be overstated.  The typical use of S is as a
> kind of interpreted glue which holds together calls to C and fortran.
> We've done a little profiling in R and while the time spent searching
> for variable values etc, is not negligible it is relatively small when
> compared with the time spend setting up design matrices and running QR
> decompositions etc (yes this is contrary to at least one statement in
> the Models in S book).
> 

This does indeed describe typical use patterns, but it is a bit of a
chicken and egg problem: Peolple do more stuff in C because doing it
in S is too slow. There will always be some things you really can't
get decent performance out of unless they are done in C/Fortran, but
with a faster interpreter/compiler you can move more from the lower
C/Fortran level to the higher S/R level. My experience with adding a
byte code compiler to xlispstat is that it did not improve much on the
speed of things most people were already doing, since those tended to
spend most of their time in the vectorized code already. But it did
make it feasible to do things like write Markov Chain Monte Carlo runs
in Lisp, which would have been virtually impossible without the
speedup from compilation. It also meant that I could move a number of
system functions previously writen in C into Lisp with essentially no
performance penalty, and this made those functins much easier to write
and maintain.

luke
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-