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

Try to replace std::vector with std::list for faster node reduction #7

Open
phobos2077 opened this issue Jun 28, 2023 · 0 comments
Open

Comments

@phobos2077
Copy link
Collaborator

Due to how BuildTreeBranch works, it does lots of erasures of the nodelist. Because it does so going from the beginning of the list and if the procedure is relatively large, it becomes almost a worst case scenario where hundreds of nodes are being copy-constructed (when shifting after erase) over and over as we progress from the first opcode to the last.

Better to use a linked list to reduce erase complexity. Should increase performance quite a lot.

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

No branches or pull requests

1 participant