I’ve just developed a new algorithm to do collision detection. I’ve tested it and it works as it should.
With 100 sprites to do collision detection on it takes just over 0.0003 seconds.
With 1000 sprites to do collision detection on it takes just over 0.03 seconds (while the Big-O(n^2) takes well over 20 seconds).
With 10000 (ten thousand yes) it takes 4.6 seconds, while the Big-O(n^2) one takes about, well, I gave up waiting :]
Are there any better ones out there?