From edd at debian.org  Tue Jan 13 19:47:54 2009
From: edd at debian.org (Dirk Eddelbuettel)
Date: Tue, 13 Jan 2009 12:47:54 -0600
Subject: [Rd] R as a scripting engine
In-Reply-To: <18796.56450.589260.354404@ron.nulle.part>
References: <alpine.OSX.1.00.0901111151050.16921@tystie.local>
	<18794.23441.997750.621046@ron.nulle.part>
	<C99649F2-B6DC-40BB-B1B0-F677B57508B4@r-project.org>
	<18796.56450.589260.354404@ron.nulle.part>
Message-ID: <18796.57818.320933.527497@ron.nulle.part>


Just to bore everyone but Simon and me to tears, here is 'fair' timing2.sh
variant using an r version that does not autoload().

edd at ron:/tmp$ ./timing3.sh 

 --- our r calling summary() 20 times
real	0m3.375s
user	0m3.100s
sys	0m0.268s

 --- GNU R's Rscript calling summary() 20 times
real	0m4.328s
user	0m3.880s
sys	0m0.412s

 --- our (empty) r calling summary() 20 times
real	0m2.517s
user	0m2.284s
sys	0m0.204s

 --- GNU R's (empty) Rscript calling summary() 20 times
real	0m2.756s
user	0m2.340s
sys	0m0.356s

 --- GNU R calling summary() 20 times
real	0m8.401s
user	0m7.812s
sys	0m0.528s
edd at ron:/tmp$ 

It's back to where we were, but Simon's point on library() taking a good
chunk of time is acknowledge.   I'll add a new switch to littler, which is
due for a new release anyway providing the new tempdir option that suggested
by Paul Gilbert a while back.

Cheers, Dirk

-- 
Three out of two people have difficulties with fractions.



[Rd] R as a scripting engine
Dirk Eddelbuettel