You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of CAGRA index pruning always sorts the input index before performing the pruning.
However, it is unnecessary when CAGRA builds the input index because the CAGRA index-building function outputs a sorted index.
On the other hand, when the index is not built by CAGRA and not sorted, the sorting process is necessary to use CAGRA pruning.
Therefore, it would be useful to make sorting optional, depending on whether the index is built by CAGRA or not.
One of the solutions for this issue is to separate the sorting process from the CAGRA pruning function and create a separate sorting function.
This would involve modifying the current prune function as follows:
An alternative solution is to make the dataset argument std::optional and sort the index only if the argument is provided.
I prefer the approach of separating the sorting function because it can reduce the time required for compiling sorting operations during compilation when the sorting function is not used in the source code.
If there are no issues with this approach, I will modify the implementation accordingly.
The text was updated successfully, but these errors were encountered:
Hi, @tfeher
The current implementation of CAGRA index pruning always sorts the input index before performing the pruning.
However, it is unnecessary when CAGRA builds the input index because the CAGRA index-building function outputs a sorted index.
On the other hand, when the index is not built by CAGRA and not sorted, the sorting process is necessary to use CAGRA pruning.
Therefore, it would be useful to make sorting optional, depending on whether the index is built by CAGRA or not.
One of the solutions for this issue is to separate the sorting process from the CAGRA pruning function and create a separate sorting function.
This would involve modifying the current prune function as follows:
An alternative solution is to make the
dataset
argumentstd::optional
and sort the index only if the argument is provided.I prefer the approach of separating the sorting function because it can reduce the time required for compiling sorting operations during compilation when the sorting function is not used in the source code.
If there are no issues with this approach, I will modify the implementation accordingly.
The text was updated successfully, but these errors were encountered: