Re: [Rd] function call overhead

2011-02-28 Thread Dominick Samperi
On Mon, Feb 28, 2011 at 6:37 PM, Paul Johnson wrote: > Snipping down to bare minimum history before comment: > > On Wed, Feb 16, 2011 at 4:28 PM, Olaf Mersmann > wrote: >> Dear Hadly, dear list, >> >> On Wed, Feb 16, 2011 at 9:53 PM, Hadley Wickham wrote: >> system.time(replicate(1e4, base:

Re: [Rd] function call overhead

2011-02-28 Thread Paul Johnson
Snipping down to bare minimum history before comment: On Wed, Feb 16, 2011 at 4:28 PM, Olaf Mersmann wrote: > Dear Hadly, dear list, > > On Wed, Feb 16, 2011 at 9:53 PM, Hadley Wickham wrote: > >>> system.time(replicate(1e4, base::print)) >>   user  system elapsed >>  0.539   0.001   0.541 >>> s

Re: [Rd] function call overhead

2011-02-16 Thread Olaf Mersmann
Dear Hadly, dear list, On Wed, Feb 16, 2011 at 9:53 PM, Hadley Wickham wrote: > I wondered about this statement too but: > >> system.time(replicate(1e4, base::print)) >   user  system elapsed >  0.539   0.001   0.541 >> system.time(replicate(1e4, print)) >   user  system elapsed >  0.013   0.000

Re: [Rd] function call overhead

2011-02-16 Thread Dominick Samperi
On Wed, Feb 16, 2011 at 1:13 PM, Paul Gilbert wrote: > (subject changed from: RE: [Rd] Avoiding name clashes: opinion on best > practice naming  conventions) > > Dominick, > > Is this really true? Is there a speed advantage to defining a local function > this way, say, within another function, a

Re: [Rd] function call overhead

2011-02-16 Thread Hadley Wickham
On Wed, Feb 16, 2011 at 12:13 PM, Paul Gilbert wrote: > (subject changed from: RE: [Rd] Avoiding name clashes: opinion on best > practice naming  conventions) > > Dominick > > Is this really true? Is there a speed advantage to defining a local function > this way, say, within another function, a

Re: [Rd] function call overhead

2011-02-16 Thread Jeffrey Ryan
Hi Paul, > `:::` function (pkg, name) { pkg <- as.character(substitute(pkg)) name <- as.character(substitute(name)) get(name, envir = asNamespace(pkg), inherits = FALSE) } and > `::` function (pkg, name) { pkg <- as.character(substitute(pkg)) name <- as.character(substitute(

[Rd] function call overhead

2011-02-16 Thread Paul Gilbert
(subject changed from: RE: [Rd] Avoiding name clashes: opinion on best practice naming conventions) Dominick Is this really true? Is there a speed advantage to defining a local function this way, say, within another function, and then calling it within a loop rather than the original? Do you