indigo icon indicating copy to clipboard operation
indigo copied to clipboard

QuadTree: Back with something faster than a `List` (Benchmarks?)

Open davesmith00000 opened this issue 3 years ago • 3 comments

Currently QuadTrees 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?

davesmith00000 avatar Dec 11 '21 15:12 davesmith00000

Hmmm. Had a couple of goes at this expecting there to be a few easy wins, but not so much.

davesmith00000 avatar Dec 11 '21 21:12 davesmith00000

Current benchmarks look like this:

Screenshot 2021-12-11 at 16 36 54

Screenshot 2021-12-11 at 16 37 12

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.

davesmith00000 avatar Dec 11 '21 21:12 davesmith00000

Update: The initial assertion here that QuadTrees are backed by Lists 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.

davesmith00000 avatar Dec 18 '21 20:12 davesmith00000