Skip to content

Reason for boxing inner values of Value #863

Answered by tyt2y3
baloo asked this question in Q&A
Discussion options

You must be logged in to vote

I agree with your general idea, and I am open to removing the boxes for some types, if you can help decide ultimately do we restrict size of outer Value to be 16 or 24 bytes.

assert_eq!(mem::size_of::<Value>(), 24); can you find out the offender? because it depends on what feature flags are being enabled.

I would rather use the vanilla type though, because Box<str> is not entirely interchangable with String for example.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@baloo
Comment options

Answer selected by baloo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants