| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
I would have (naively) assumed that many compilers would vectorize contains_non_ascii_slow.
Sorry, something went wrong.
|
@tniessen Me too! Fwiw, I’m not really trying to optimize anything here (who even uses 'ascii'…) but rather just get rid of code we don’t need anymore. |
Sorry, something went wrong.
|
The commit title is missing the "d" from "simdutf". |
Sorry, something went wrong.
Sorry, something went wrong.
|
|
||
| case ASCII: | ||
| if (contains_non_ascii(buf, buflen)) { | ||
| if (simdutf::validate_ascii_with_errors(buf, buflen).error) { |
There was a problem hiding this comment.
Any reason for using the error version? Is the common case to have invalid ASCII?
Sorry, something went wrong.
There was a problem hiding this comment.
The with_errors variant bails out early if it detects invalid ASCII, instead of running the entire string, so my thought was that it would match the performance profile of the previous code here best.
The common case is to not use this branch (ASCII) at all :)
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
| } | ||
|
|
||
| return false; | ||
| } |
There was a problem hiding this comment.
Complete aside: I have a distinct memory of writing this code, it looks like how I would write such code, yet git blame attributes it to Isaac S... huh. The human mind is a fickle thing.
Sorry, something went wrong.
There was a problem hiding this comment.
@bnoordhuis I double-checked out of interest (and also because it looks like code from you), and … you did! e325ace is all yours 🙂
Sorry, something went wrong.
There was a problem hiding this comment.
I feel vindicated now! Thanks for digging that up, Anna. :)
Sorry, something went wrong.
There was a problem hiding this comment.
Written almost ten years ago, and you still remember your code. I've nothing but respect for all of you.
Sorry, something went wrong.
PR-URL: #46271 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: #46271 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: #46271 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Darshan Sen <raisinten@gmail.com>
| Back | FazBrowse Home | New Git URL |
No description provided.