Re: [R] Is it possible to avoid copying arrays when calling list()?

2013-08-17 Thread MRipley
behavior I expect in R. Do you care to illustrate this? -- David. >Best, >Gang > > >2013/8/16 MRipley > >>Usually R is pretty good about not copying objects when it doesn't need >>to. However, the list() function seems to make unnecessary copies. Fo

[R] Is it possible to avoid copying arrays when calling list()?

2013-08-16 Thread MRipley
Usually R is pretty good about not copying objects when it doesn't need to. However, the list() function seems to make unnecessary copies. For example: > system.time(x<-double(10^9)) user system elapsed 1.772 4.280 7.017 > system.time(y<-double(10^9)) user system elapsed 2.564