Skip to content
Prev 27444 / 63424 Next

Understanding an R improvement that already occurred.

On Jan 30, 2008 7:20 AM, Jay Emerson <jayemerson at gmail.com> wrote:
That's interesting - I never noticed that change.  On the same topic,
in R 2.7.0 devel, the (re-)assignment in the following example does no
longer create an extra copy:
gc()> gc()
           used  (Mb) gc trigger  (Mb) max used  (Mb)
Ncells   132056   7.1     350000  18.7   350000  18.7
Vcells 25136968 191.8   28050871 214.1 25137357 191.8
used  (Mb) gc trigger  (Mb) max used  (Mb)
Ncells   132060   7.1     350000  18.7   350000  18.7
Vcells 25136969 191.8   29533414 225.4 25137357 191.8

In R 2.6.1 that 2nd assignment would result in:
used  (Mb) gc trigger  (Mb) max used  (Mb)
Ncells   138119   7.4     350000  18.7   350000  18.7
Vcells 25126464 191.7   52877950 403.5 50126482 382.5

See https://stat.ethz.ch/pipermail/r-devel/2007-September/047008.html
for background.

Thanks a lot whoever (Luke?) took the time to update matrix().

/Henrik