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

Housekeeping and code cleaning #28

Open
sezna opened this issue Dec 8, 2019 · 0 comments
Open

Housekeeping and code cleaning #28

sezna opened this issue Dec 8, 2019 · 0 comments

Comments

@sezna
Copy link
Owner

sezna commented Dec 8, 2019

entity.rs needs a refactor. The branching on the right and the left is no bueno. Some alternatives:

  • Keep the node structure but make a function do the stuff that's duplicated. Thread-spawn it (bench this) on big recursive calls and do both sides at once.
  • Change left, right to [Node; 2]
  • Node could be an enum of leaf or internal, getting rid of some options
  • The tree should be an iter so we don't have to process the entire vec beforehand
  • There might be better (unsafe?) ways to represent the tree in memory...maybe.
@sezna sezna changed the title Left/Right duplicated code Housekeeping and code cleaning Jan 27, 2020
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