|
From: Bruno H. <br...@cl...> - 2005-06-06 18:24:18
|
Sam wrote: > and what does adding 2 bytes to each vector have to do with this? It's not 2 bytes, it's 8 bytes: First, when a length field increases from 4 to 8 bytes, it's +4 bytes. Due to alignment reasons (on 64-bit platforms, varobject_alignment is 8), it's either +0 or +8. > this will add > (* 2 (+ 11246 4638 2936 292 495 95)) > 39404 bytes - less than 40k to a 2M image - 2%. No, it will add either 0 or 160k to a 2MB image - 0% or 8%. And 8% more memory means typically 16% slowdown (rule of thumb). Now, when you look at the definitions of VAROBJECT_HEADER and VRECORD_HEADER, you see that on 64-bit platforms there is currently a hole of 4 bytes in the header. So it's really +0% more memory. !! :-) Bruno |