In his book, Hadley Wickam explains why an empty vector is 40 bytes in the memory section . But what about the matrix? The matrix also has at least two integers in its attributes for storing the number of columns and the number of rows. But it’s not enough to explain why the empty matrix is 208 bytes. I was expecting something like 48 bytes.
> object.size(matrix())
208 bytes
source
share