Skip to content

(pedantic) The box_collection docs are not quite correct. #9392

Open
@Lokathor

Description

@Lokathor

Description

Currently the docs for box_collection state:

## Why is this bad?
Collections already keeps their contents in a separate area on the heap. So if you Box them, you just add another level of indirection without any benefit whatsoever.

However, there is one clear benefit: Box is one non-null pointer big instead of being 2-3 (or more!) pointers big. Particularly for error data, the extra layer of boxing to keep the error variant small outweighs the mild speed penalty.

Version

No response

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-documentationArea: Adding or improving documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions