@davidr@alecthegeek I greatly prefer 4 for legibility (and agree with the other comments of "use 100 characters").
I use like 22pt or bigger typeface and still have plenty of room for those occasional (or at least -- should be occasional!) longer lines.
Two-space indenting can be good for JSON or other deeply-nested structures with 'shallow' + delimited blocks, but 4 is "basically standard".
(I did once see a "3" codebase; it is now 4).
As an #engineer, if I had any other #data series that was pretty smooth for several years and then started getting very spiky month to month, I'd look for some underlying malfunction.
#kdtree and ball trees seem cool, but require full knowledge of the thing I'm searching for. What if it's 7 dimensional and I only know 4 of the values?
I feel like a "parallel kd tree" with a separate binary index on each dimension would work better here.
Reduce depth. Allow unspecified values. It'd also be a snap to create and search each dim in parallel.