indigo
indigo copied to clipboard
QuadTree: Back with something faster than a `List` (Benchmarks?)
Currently QuadTree
s use a List
in the background to store the quads, this is probably very slow.
Would be good to benchmark, possibly against RTree2D as a reference implementation?
Hmmm. Had a couple of goes at this expecting there to be a few easy wins, but not so much.
Current benchmarks look like this:
I suspect the work here really is to make the underlying operations faster. Things like approximate Vertex
comparison and line intersection tests and things like that.
Update: The initial assertion here that QuadTree
s are backed by List
s is wrong. The implementation uses lists in a bunch of different ways, but the actual tree is a nested ...tree ...structure made up of case objects and case classes.