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

maximum recursion depth exceeded while calling a Python object #29

Open
yuvalshachaf opened this issue Jun 16, 2020 · 3 comments
Open

Comments

@yuvalshachaf
Copy link

when running topk for k >= 1000 i get this error.
of course i can increase the sys.setrecursionlimit but up to a point

also the topk uses heap which slows down dramatically. using List as for frequent is x5 faster

@chuanconggao
Copy link
Owner

Heap was used for calculating top-k. If both your k and your data are large, the performance is impacted.

Feel free to have a pull request for how to improve the performance using list. Please also add some benchmarks to help understand the optimizations.

@yuvalshachaf
Copy link
Author

many thanks,
what about the recur depth. i cannot run topk for more than 1500 or so

@chuanconggao
Copy link
Owner

This part can be explained in README and further provide an additional optional parameter for both CLI and library to be tweaked by user.

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