Hi IOhannes
Interesting side-notes. Thanks! Roman
On Fri, 2022-01-14 at 09:11 +0100, IOhannes m zmoelnig wrote:
sidenote: of course we are not alone. take for example the most popular programming language¹ of the last few years: a boolean value ideally requires a single bit to be stored accurately. now in python (tested on Python3.9 on a 64bit linux system), it doesn't take 1 bit, or even 1 byte, but instead it takes 8 bytes.
sys.getsizeof([True]*3)-sys.getsizeof([True]*2)
8
at least, if you store the boolean in an array (a single boolean value (outside of an array) has some extra metadata, that take 28 bytes in total)²
sys.getsizeof(True)
28