You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "chaokunyang (via GitHub)" <gi...@apache.org> on 2025/01/08 13:04:10 UTC
[PR] c++(feat): add simd accelerated c++ ascii check funcion [fury]
chaokunyang opened a new pull request, #1999:
URL: https://github.com/apache/fury/pull/1999
## What does this PR do?
add simd accelerated c++ ascii check funcion
## Related issues
<!--
Is there any related issue? Please attach here.
- #xxxx0
- #xxxx1
- #xxxx2
-->
## Does this PR introduce any user-facing change?
<!--
If any user-facing interface changes, please [open an issue](https://github.com/apache/fury/issues/new/choose) describing the need to do so and update the document if necessary.
-->
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
<!--
When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here.
-->
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [PR] feat(c++): add simd accelerated c++ ascii/latin1 check funcion [fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang merged PR #1999:
URL: https://github.com/apache/fury/pull/1999
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [PR] feat(c++): add simd accelerated c++ ascii/latin1 check funcion [fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on PR #1999:
URL: https://github.com/apache/fury/pull/1999#issuecomment-2577884346
@pandalee99 latin1 check function alse added
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [PR] feat(c++): add simd accelerated c++ ascii check funcion [fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on PR #1999:
URL: https://github.com/apache/fury/pull/1999#issuecomment-2577823419
> @chaokunyang Maybe,This feature is already implemented in `string_util.cc`
>
> ```c++
> bool isLatin(const std::string &str) {
> const char *data = str.data();
> size_t len = str.size();
>
> size_t i = 0;
> uint8x16_t latin_mask = vdupq_n_u8(0x80);
> for (; i + 16 <= len; i += 16) {
> uint8x16_t chars = vld1q_u8(reinterpret_cast<const uint8_t *>(data + i));
> uint8x16_t result = vandq_u8(chars, latin_mask);
> if (vmaxvq_u8(result) != 0) {
> return false;
> }
> }
>
> for (; i < len; ++i) {
> if (static_cast<unsigned char>(data[i]) >= 128) {
> return false;
> }
> }
>
> return true;
> }
> ```
I missed that, it's named as `isLatin`, it should be renamed to `isASCII`. Latin1 is superset of ascii
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org