3
Python 一个整型居然最少 24 字节
source link: https://www.v2ex.com/t/821244
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
print(sys.getsizeof(0)) # 24
print(sys.getsizeof(1)) # 28
print(sys.getsizeof(2)) # 28
print(sys.getsizeof(2**15)) # 28
print(sys.getsizeof(2**30)) # 32
print(sys.getsizeof(2**128)) # 44
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK