MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1x07dj1/wasteofpreciousspace/pej2yea/
r/ProgrammerHumor • u/_bagelcherry_ • Oct 07 '26
244 comments sorted by
View all comments
Show parent comment
3
Not necessarily 1 byte. Like some windows BOOLs are (were?) typedef to int, so probably 4 or 8 bytes. And Python built bools on their arbitrary precision int type, so they're... some weird size, and the size is different for True and False
True
False
... but yeah, usually 1 byte.
1 u/prehensilemullet Oct 07 '26 Lol wow. Also TIL that float arithmetic is faster than integer arithmetic in Python, since ints are arbitrary precision…hilarious 1 u/DearVeggies Oct 08 '26 Sounds reasonable for Python, they'd use BigInts as default. Remember, they don't care about performance (and that is good).
1
Lol wow. Also TIL that float arithmetic is faster than integer arithmetic in Python, since ints are arbitrary precision…hilarious
1 u/DearVeggies Oct 08 '26 Sounds reasonable for Python, they'd use BigInts as default. Remember, they don't care about performance (and that is good).
Sounds reasonable for Python, they'd use BigInts as default. Remember, they don't care about performance (and that is good).
View all comments
Show parent comment
3
u/MattieShoes Oct 07 '26
Not necessarily 1 byte. Like some windows BOOLs are (were?) typedef to int, so probably 4 or 8 bytes. And Python built bools on their arbitrary precision int type, so they're... some weird size, and the size is different for
TrueandFalse... but yeah, usually 1 byte.