Skip to content

Document meaning of primitive arrays in profiles

Currently when you produce a profile for an application that makes use of primitive arrays, you will get a profile that mentions ARR_WORDS, ARR_PTRS, MUT_ARR_PTRS, etc.

There's this table that matches up what these are to primitive arrays https://bgamari.github.io/posts/2016-03-30-what-is-this-array.html (though it's slightly out-of-date at this point).

It would be great if we had a section in the user guide that documented what these means, and explained in a beginner-friendly way how this matches up with user written code. For instance it would be good to explain some relevant optimisations like unpacking and how that affects the profiles you get. It would be good to make explicit as well how a heap census works on a high level.

Edited by Teo Camarasu
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information