parent
7d6d307e36
commit
ec4140a9e5
|
@ -129,7 +129,7 @@ y <- rep(x, 1000)
|
|||
pryr::object_size(y)
|
||||
```
|
||||
|
||||
`y` doesn't take up 1,000x as much memory as `x`, because each element of `y` is just a pointer to that same string. A pointer is 8 bytes, so 1000 pointers to a 136 B string is 8 * 1000 + 136 = 8.13 kB.
|
||||
`y` doesn't take up 1,000x as much memory as `x`, because each element of `y` is just a pointer to that same string. A pointer is 8 bytes, so 1000 pointers to a 152 B string is 8 * 1000 + 152 = 8.14 kB.
|
||||
|
||||
### Missing values
|
||||
|
||||
|
|
Loading…
Reference in New Issue