Closed HenrikBengtsson closed 6 years ago
The change/improvement seems to have occurred going from R 3.3.3 to R 3.4.0:
> getRversion()
[1] '3.3.3'
> x <- integer(1000)
> y <- double(1000)
> profmem::profmem(z <- (x < y))
Rprofmem memory profiling of:
z <- (x < y)
Memory allocations:
bytes calls
1 8040 <internal>
2 4040 <internal>
total 12080
and
> getRversion()
[1] '3.4.0'
> x <- integer(1000)
> y <- double(1000)
> profmem::profmem(z <- (x < y))
Rprofmem memory profiling of:
z <- (x < y)
Memory allocations:
bytes calls
1 4040 <internal>
total 4040
The same is true for z <- (x == y)
.
I've just asked about this on R-devel: https://stat.ethz.ch/pipermail/r-devel/2018-January/075449.html
@lawremi (thxs) confirmed (he made) this improvement for R 3.4.0. So, the vignette/README needs a new example.
Vignette example may no longer be true in recent R versions, e.g. in R 3.4.3 there seems to be no coercion to double for
x
in: