Skip to content

Use __slots__ throughout the expression system #1731

@MatthewARinehart

Description

@MatthewARinehart

Why

As Manticore users, we want Manticore to use RAM as efficiently as possible. One can minimize the amount of memory a Python object uses by using the __slots__ property. Since the expressions system involves the creation of thousands of nested Python objects, using __slots__ here would provide noticeable memory usage improvements.

Acceptance Criteria

All subclasses of Expression use the __slots__ property

Dev Notes

We added limited support for this in #1635, but found out that subclasses of slotted classes need to also have __slots__ explicitly defined, so this implementation is not complete.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions