Message from JavaScript discussions

June 2017

— There has to be some way to use just two arrays... some sort of interval tree that overlaps maybe?


The problem is we can't use a traditional object-based tree. Keeping everything numeric arrays is great for speed by a huge amount

— Wait, this is more horrible than I even thought

— It would be ... precision * 65535^2

— Or precision * 4,294,836,225

— That is 4 billion array indexes

— For a precision of 8, that is 34,358,689,800... over 34 billion

— Because for every char code in the first array alone, we have 65535-index arrays for each char code

— For each precision layer, it just gets bigger and bigger

— Maybe we have to use a radix tree here?

— Hold on

— Hmm, this is hard