neilconway opened a new issue, #20753: URL: https://github.com/apache/datafusion/issues/20753
### Is your feature request related to a problem or challenge? We should optimize the `strpos` implementation in two ways: 1. When the needle is scalar, we can build a single `memmem::Finder` and use it to search repeatedly. This is significantly faster than using `memchr`, it turns out, and the cost of constructing the finder is cheap because it is amortized over the batch. 2. We previously optimized `strpos` to use `memchr` for searching when both haystack and needle are ASCII. That was needlessly conservative: UTF-8 is self-stabilizing, so it should be safe to use `memchr` to search for matches for any combination of ASCII and UTF-8 needle and haystack. ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
