New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow PartialRadixSort for Partial Array #692
base: master
Are you sure you want to change the base?
Allow PartialRadixSort for Partial Array #692
Conversation
That's reasonable, but it would be best to have a use case. I am not sure that generalizing code that is only used in a specific manner is necessarily helpful. |
So, the use case that lead to this effort is as following:
|
@kf-vikas Can you give me an example of code where you'd use this function? My concern is that your PR adds functionality that is not used, not tested, not benchmarked. If we could at least illustrate the use case.. |
This method was never intended to be a public sorting utility, and I don’t object to copying it (I wrote it so I think I can grant permission to copy it.) Can I ask about the use case though? Are you inserting values into the bitmap in ascending order? If so, you can use the bitmap writer API which avoids the binary searches which make the add method expensive. |
@kf-vikas Let me elaborate on my concern. As @richardstartin stated, this is not part of the public API. This means, in particular, that it could change or disappear in a future release. Now, we can make it part of our public API, but we would want something like a test that illustrates the use case. We also want to promote good usage of what is already available. To be clear, increasing the surface area of our public API is not a goal. In some instances, that can be a negative. |
@lemire - we tried it in one of our internal implementations. I am not sure if I can share the code. Let me explain what lead to this. One of our use case happened to insert a lot of random values in the Roaring Bitmap. On profiling, it was found that Orthogonal to this, I would like to know your thoughts/recommendations on how to insert random numbers? Thank you. |
@richardstartin - our use case is insertion of random numbers in the RoaringBitmap. Options:
Your thoughts are welcome! |
@lemire - if the concern is of a missing unit test, I am happy to add it to the diff. The use case is something I described earlier. Please let me know if the explanation is not clear. Thank you. |
Adding a test would help a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a test of the new functionality before merging.
SUMMARY
Automated Checks
./gradlew test
and made sure that my PR does not break any unit test../gradlew checkstyleMain
or the equivalent and corrected the formatting warnings reported.