bigbang
bigbang copied to clipboard
Housekeeping and code cleaning
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.