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
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
the lexicographical_partition_ranges function currently materializes a vector of incrementing indices, which it then uses to call slice::partition_point. The benefit is that we can directly reuse a standard rust function, the downside is that the vector of indices can be quite large and that it adds another indirection. I think by duplicating the functionality of partition_points to work with a range we could avoid this allocation and indirection.
Describe the solution you'd like
Reimplement partition_points to work with a range. The implementation in the standard library calls a relatively simple binary search which could be simplified for this usecase. The predicate could be used directly so there is no need for using the Ordering enum while searching.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
the
lexicographical_partition_ranges
function currently materializes a vector of incrementing indices, which it then uses to callslice::partition_point
. The benefit is that we can directly reuse a standard rust function, the downside is that the vector of indices can be quite large and that it adds another indirection. I think by duplicating the functionality ofpartition_points
to work with a range we could avoid this allocation and indirection.Describe the solution you'd like
Reimplement
partition_points
to work with a range. The implementation in the standard library calls a relatively simple binary search which could be simplified for this usecase. The predicate could be used directly so there is no need for using theOrdering
enum while searching.The text was updated successfully, but these errors were encountered: