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
For maximising performance of matching, I have a Vec<Utf32String> that I want to match against.
It's fairly big (hundreds of thousands of records).
For matching I do something like:
So far so good, but then I found no way of converting an Utf32Str to Utf32String for the final Vec<Utf32String>
It would be nice to have, first of all an AsRef<Utf32Str> for Utf32String, so that I don't have to call .slice(..), next it would be awesome to have a From<Utf32Str> for Utf32String, so that I can do something like Utf32String::from(file_name) in the final Vec<Utf32String>
The text was updated successfully, but these errors were encountered:
For maximising performance of matching, I have a
Vec<Utf32String>
that I want to match against.It's fairly big (hundreds of thousands of records).
For matching I do something like:
So that I can sort it like so:
And finally, construct a new
Vec<Utf32String>
with the filtered result:Notice that I do
file_name.clone()
twice.Now, to avoid at least 1 clone, I was thinking of refactoring the scoring vector like so:
So far so good, but then I found no way of converting an Utf32Str to Utf32String for the final
Vec<Utf32String>
It would be nice to have, first of all an
AsRef<Utf32Str>
for Utf32String, so that I don't have to call.slice(..)
, next it would be awesome to have aFrom<Utf32Str>
for Utf32String, so that I can do something likeUtf32String::from(file_name)
in the finalVec<Utf32String>
The text was updated successfully, but these errors were encountered: