Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
New
Description
Currently HnswGraph uses SparseFixedBitSet "visited" to track where it has already been. The logic currently looks like this:
if (visited.get(entryPoint) == false) { visited.set(entryPoint); ... logic ... }
If SparseFixedBitSet had a getAndSet (like FixedBitSet), the code could be:
if (visited.getAndSet(entrypoint) == false) { ... logic ... }