On Tue, Oct 22, 2024 at 3:46 PM Erik Sjoblom <sjoblo...@gmail.com> wrote:
> > Yes, I did expect that the first element should take 24+12 bytes and let's > round that to 50 bytes. > Assuming the 24 is coming from the array overhead you are expecting that storing a custom composite typed value takes zero overhead. That is a faulty assumption. A user created custom type always takes some overhead because it is considered a variable structure, even in the case where all of its fields are fixed-width. Furthermore, it is self-describing, and so that description has to go somewhere. Therefore, there must be a non-zero per-element overhead to store composite values within an array. As Tom told you, the specific non-zero number is 24 bytes. David J.