xinlifoobar commented on PR #6231:
URL: https://github.com/apache/arrow-rs/pull/6231#issuecomment-2291386498
Here is an updated benchmark for the latest code. It indicates the
optimizations only work on the first 4/12 bytes. Any time it reaches the
buffer, the perf is down. Given the result, I suspect it won't work on complex
cases like `regex`. I will test them though.
# xinli @ arch-dev in ~/source/repos/arrow-rs on
git:dev/xinli1/optimize_prefix o [22:23:48]
$ critcmp master optimize_prefix
group master
optimize_prefix
----- ------
---------------
like_utf8view scalar complex 1.00 174.5±2.43ms
? ?/sec 1.01 176.0±2.07ms ? ?/sec
like_utf8view scalar contains 1.00 129.2±1.50ms
? ?/sec 1.02 131.6±5.38ms ? ?/sec
like_utf8view scalar ends with 1.01 38.0±0.68ms
? ?/sec 1.00 37.7±0.38ms ? ?/sec
like_utf8view scalar equals 1.00 26.2±0.34ms
? ?/sec 1.00 26.2±0.37ms ? ?/sec
like_utf8view scalar starts with 1.63 32.6±0.40ms
? ?/sec 1.00 20.0±0.29ms ? ?/sec
like_utf8view scalar starts with more than 4 bytes 1.07 33.8±0.38ms
? ?/sec 1.00 31.7±0.28ms ? ?/sec
--
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]