-
Notifications
You must be signed in to change notification settings - Fork 0
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
Further improve performance #83
Conversation
Reduces String clones and overall memory usage of String instances
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand what's going on, but I trust you that this improves performance. Because, if I understood it correctly, by splitting between compute and execute you avoid copying the env unnecessarily, correct? Do you have some numbers of the run time now?
Also, I was thinking. Do we still clone the whole IR every time we run a pass? Maybe we could improve performance further if we move the IR and only create new copies of things if we actually modify them. I don't know if it will work since we need the IDs for each bucket but may be worth a try
_compute_instruction, | ||
_execute_instruction | ||
); | ||
error::add_loc_if_err(result, inst.as_ref()) | ||
} | ||
|
||
/**************************************************************************************************** | ||
* Private implemenation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: typo
You got it. Profiling showed that Env clones and destructors were taking the most time by far. |
Each pass does still reconstruct the IR via the |
It's not only performance but memory usage, but we can leave it for future work then, if it's not as pressing. This PR has enough stuff already |
No description provided.