boolean data type
BlitzMax Forums/BlitzMax Programming/boolean data type
| ||
Is there ant difference in making true/false data a byte, short or an Int. I see a lots places where people use Int. Is that a waste of space since boolean can fit into a byte? Thanks |
| ||
Yes, it's a waste of space, but with even the cheapest machines having 2 gigs now, shaving off three bytes here and there really doesn't make much difference. Also, consider that using Integers is faster than Bytes and Shorts. |
| ||
If you wanted to be really pedantic you could store eight booleans in a single byte. Completely pointless, though. |
| ||
@Gabriel: I had a feeling Int was faster @Gfk: True, True |