A
$ python3.7 bench_fields.py
Test Field: 0.9337084220023826
Test FieldWithSlots: 0.8121366699997452
Field size: 64
FieldWithSlots size: 112
Size: a a a
A
$ python3.7 bench_fields.py
Test Field: 0.9337084220023826
Test FieldWithSlots: 0.8121366699997452
Field size: 64
FieldWithSlots size: 112
A
YV
YV
YV
YV
YV
YV
YV
import sys
print(sys.getsizeof({}))
print(sys.getsizeof({'dict':{'dict': {'dict':1}}}))
YV
YV
YV
MA
YV
YV
YV
YV
YV
Field size: 64
FieldWithSlots size: 112 у тебя разница встала в размер тапла, что тоже понятно почему 🙂YV
A
Test Field: 0.9273311259967159
Test FieldWithSlots: 0.811813328997232
Field size: 64
FieldWithSlots size: 112
Field asizeof: 952
FieldWithSlots asizeof: 336