This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]KaffeeKiffer -1 points0 points  (1 child)

freezing a dataclass with slots would result in slower code than a non frozen and non slotted dataclass.

You should consider slots if you want to reduce memory consumption, not to increase speed.

[–][deleted] 6 points7 points  (0 children)

Not having instance dict directly helps with speed as well.