12

How much space does an STUArray with Bool elements use for each element? Does it actually pack things down to one bit? Or does it use an entire byte per element?

1 Answer 1

13

The source code of the array package shows that yes, multiple Bool are packed together as bits into byte arrays.

Doesn't seem to be documented(?)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.