Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use __slots__ throughout the expression system #1731

Closed
MatthewARinehart opened this issue Jun 18, 2020 · 0 comments · Fixed by #2394 · May be fixed by #1729
Closed

Use __slots__ throughout the expression system #1731

MatthewARinehart opened this issue Jun 18, 2020 · 0 comments · Fixed by #2394 · May be fixed by #1729
Assignees

Comments

@MatthewARinehart
Copy link

MatthewARinehart commented Jun 18, 2020

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.

@MatthewARinehart MatthewARinehart linked a pull request Jun 18, 2020 that will close this issue
@ehennenfent ehennenfent changed the title Slotted fast tested Expression system (CORE) Use __slots__ throughout the expression system Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants