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

Slow function finalize/encode #81

Open
PromyLOPh opened this issue Jul 20, 2017 · 1 comment
Open

Slow function finalize/encode #81

PromyLOPh opened this issue Jul 20, 2017 · 1 comment

Comments

@PromyLOPh
Copy link
Contributor

I’m generating about 1000 test cases, a few hundred instructions each. This process takes 195 seconds on my PC. According to cProfile 64% of the time is spent in deepcopy, which is quite a bit. Below is a full call graph generated with gprof2dot:

calling

Apparently each of the two steps (ABIFunction, EncodedFunction) involved deepcopy()ies all instruction objects, which are quite heavy. If deepcopy() could be – somehow – avoided the whole process would be alot faster.

@Maratyszcza
Copy link
Owner

deepcopy in ABIFunction is needed to support finalizing the same function several times for different ABIs. If you don't use this feature, you can locally replace it with simple copy. deepcopy in EncodedFunction is likely redundant, I'd need to take a closer look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants