billyb2 / game

GNU Affero General Public License v3.0
2 stars 0 forks source link

Storing map object property bools as a bitvec (one byte) #49

Closed billyb2 closed 3 years ago

billyb2 commented 3 years ago

Currently, each map object property (boolean) takes up 1 byte, taking up a total of 8 bytes. This, however, is fairly unnecessary, as storing a bool as a simple 0 or 1 would be sufficient. We could store maybe 5 or 6 bools into a single byte, thereby saving some space.

billyb2 commented 3 years ago

Probably not worth the effort and increased memory/cpu usage