Closed JinwoongKim closed 8 years ago
Currently, nodes are separately allocated in a Top-down function
As we use the child offset to access a child node instead of a child pointer, those nodes should be located in the contiguous memory address.
Option 1. pre-allocation. Allocate nodes in advance.
Option 2. Copy nodes It may cause a double-allocation
If we change child offset to long long, we don't need to worry about above problem.
When we need to dump the index file on disk, then just dump in BFS fashion
Currently, nodes are separately allocated in a Top-down function
As we use the child offset to access a child node instead of a child pointer, those nodes should be located in the contiguous memory address.
Option 1. pre-allocation. Allocate nodes in advance.
Option 2. Copy nodes It may cause a double-allocation