Change spatial traversal to fix perf regression from #897 #976
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix perf regression from #897
On Saturn with the standard HACC 37M problem (eps=0.042), the traversal time goes down (compared to master (fbd2584)):
minpts = 2 (
query+cluster
timer):FDBSCAN: 0.147 -> 0.114
FDBSCAN-DenseBox: 0.154 -> 0.126
minpts = 10
FDBSCAN
neigh
: 0.058 -> 0.057query
: 0.137 -> 0.115FDBSCAN-DenseBox
neigh
: 0.057 -> 0.057query
: 0.161 -> 0.129This patch should restore most of the lost performance due to APIv2 refactoring:
![apiv2_timeline](https://private-user-images.githubusercontent.com/7297887/288616925-8e7db66a-7d64-4cbe-a25a-5f6bdadf2d95.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTkzOTksIm5iZiI6MTczOTM1OTA5OSwicGF0aCI6Ii83Mjk3ODg3LzI4ODYxNjkyNS04ZTdkYjY2YS03ZDY0LTRjYmUtYTI1YS01ZjZiZGFkZjJkOTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTExODE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTcwZjAyZTZkNjNjZDZhMWU2N2JjZTIwNmI2NGYzOTYwMTkxYzUzYjM3YTIxZTQ4NzViMmUwYjJkNTFkZmY0OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.FoFjw1fOVOp1tDeQCxW59KgiLUQsNLZVt9UiJVzrkuE)