YUZHEthefool commented on PR #10600: URL: https://github.com/apache/arrow-rs/pull/10600#issuecomment-5232170191
> are we aiming to do some optimizations on the rank function for view types? I wanted to explore, although I don't have a winning optimization yet. I prototyped an indexed comparator that compares the inline prefix first and only resolves the backing buffer on collisions. It regressed by 20–43%: byte_view_rank already materializes the slice descriptors once, while my version added a view lookup and branches to the hot comparison loop. The benchmarks alone are probably not compelling enough. A more promising approach is to reuse the strategy already proven by sort_byte_view: cache the raw view, or a wider local sort key, and only access the backing buffer for key collisions. I also plan to add a long-value/same-prefix case related to #7350, since random [0-400] values rarely exercise the expensive prefix-collision path. I'll mark this PR as draft and turn it into a perf PR only if I can demonstrate a clear improvement; otherwise I'll close the benchmark-only PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
