Rich-T-kid commented on PR #10396:
URL: https://github.com/apache/arrow-rs/pull/10396#issuecomment-5037411691
> im just curious how the previous PR seemed to suggest 0 regressions,
meanwhile adding one more causes a noticeable bump
>
> though we are at the single digit microsecond scale
@Jefffrey i am as-well. I think it has to do with the number of checks.
In the previous PR, we only added three comparisons:
1. Check if the byte slice is empty (`is_some_and()`)
2. Check if the first byte is ASCII (range check `matches!(*self,
'0'..='9')`)
3. Based on the result of comparison #/2, decide whether to call
`trim_ascii()`
this PR has those exact same checks but twice and we also have two exta
comparissions for the
`match (prefix,suffix){}` statment as well.
so about 8 extra comparisons. I'm not sure if adding 8 micro seconds is
super important here. ideally there would be no regression but we need each of
the 8 comparisons
--
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]