Boolean Add-on #64
Closed
nwinn-student
started this conversation in
Ideas
Replies: 1 comment
-
Pre-processing into a number would be ideal in most of these situations. Pre-processing in general is preferable when the goal is reduced output size. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Although this has already been declined in whole, I wish to publicize the decline as the idea is beneficial to size-oriented serializers.
Would it be worth it to add more approaches for booleans? Particularly the option to store 1-8 booleans in 2 bytes. There is also the option to store booleans w/ a size, like buffers and strings, and pack 8 booleans per byte.
I do not see many using booleans except for the occasional truthy condition. I do not expect users to create arrays full of booleans, as buffers and strings and 32-bit integers and even vectors are more efficient.
I do however see small collections of booleans being easy to identify and store. We could even localize the boolean as a number and continue processing (modifying the number) until we hit a non-boolean or the number is greater than some value then store the number.
Beta Was this translation helpful? Give feedback.
All reactions