My thanks to Bill Dunlap and Simon Urbanek for clarifying many of the
details. This gives me what I need to go forward.
Yes, I will likely convert more and more things to .Call over time.
This clearly gives the most control over excess memory copies. I am
getting more comments from people usi
On Oct 3, 2011, at 2:43 PM, Terry Therneau wrote:
>
> On Mon, 2011-10-03 at 12:31 -0400, Simon Urbanek wrote:
>>> Thanks. I was hoping that x[,sorted] would act like "double(n)"
>> does in a .C call, and have no extra copies made since it has no local
>> assignment.
>>
>> Yes it does act the s
> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
> Behalf Of Terry Therneau
> Sent: Monday, October 03, 2011 11:44 AM
> To: Simon Urbanek
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] number of copies
>
>
On Mon, 2011-10-03 at 12:31 -0400, Simon Urbanek wrote:
> > Thanks. I was hoping that x[,sorted] would act like "double(n)"
> does in a .C call, and have no extra copies made since it has no local
> assignment.
>
> Yes it does act the same way, you get an extra copy with double(n) as
> well - th
Terry,
On Oct 3, 2011, at 10:32 AM, Terry Therneau wrote:
> I'm looking at memory efficiency for some of the survival code. The
> following fragment appears in coxph.fit
>coxfit <- .C("coxfit2", iter=as.integer(maxiter),
> as.integer(n),
> as.integer(nvar)
I'm looking at memory efficiency for some of the survival code. The
following fragment appears in coxph.fit
coxfit <- .C("coxfit2", iter=as.integer(maxiter),
as.integer(n),
as.integer(nvar), stime,
sstat,
x= x[sorted,