in reply to Re: Heap structure for lookup?
in thread Heap structure for lookup?
The problem is that Tree::RedBlack is implemented in pure Perl, using a blessed hash for each node.
Without having tried it, I estimate that a tree to hold my 150e6 values would require ~40GB of ram.
I haven't found an XS implementation, but even then it would require at least 2x64-bit pointers + a 64-bit pointer to an SvUV + 1-bit per node. If they stored the R/B in an unused bit in one of the pointers, then that's 56 bytes * 150e6 = ~8GB, which is too much.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Heap structure for lookup?
by hdb (Monsignor) on May 27, 2015 at 09:09 UTC | |
by BrowserUk (Patriarch) on May 27, 2015 at 09:28 UTC | |
by hdb (Monsignor) on May 27, 2015 at 10:44 UTC | |
by BrowserUk (Patriarch) on May 27, 2015 at 11:42 UTC |