Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Lokathor opened this issue Aug 29, 2022 · 0 comments
Open

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

Lokathor opened this issue Aug 29, 2022 · 0 comments
Labels
A-documentation Area: Adding or improving documentation

Comments

@Lokathor
Copy link

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

@Alexendoo Alexendoo added the A-documentation Area: Adding or improving documentation label Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Adding or improving documentation
Projects
None yet
Development

No branches or pull requests

2 participants