About the SIMD acceleration feature of ripgrep. #1822
-
On Ubuntu 20.04, I compiled the git master version of ripgrep with the following command:
As you can see, it also shows the SIMD featrue at the runtime level, but I haven't used any of the parameters here, as shown below:
Any hints will be highly appreciated. Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
In Rust, some uses of SIMD work on Rust stable. Some don't. Specifically, platform dependent use of specific vendor intrinsics on Most of the SIMD in ripgrep and its dependencies uses this form of SIMD. But there is one dependency that doesn't: The reasons why The only thing |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your in-depth explanation.
Generally speaking, on modern OSes, the default locale is UTF-8. So the searching UTF-16 encoded file names or contents shouldn't be a routine task. Regards, |
Beta Was this translation helpful? Give feedback.
In Rust, some uses of SIMD work on Rust stable. Some don't. Specifically, platform dependent use of specific vendor intrinsics on
x86_64
works on stable Rust. And in particular, one can compile portable binaries where only specific functions in the code will use, say, 256-bit vectors while the rest of the code won't. (And it would be undefined behavior to call said functions on platforms that don't support 256-bit vectors.)Most of the SIMD in ripgrep and its dependencies uses this form of SIMD.
But there is one dependency that doesn't:
encoding_rs
. That crate sticks with the unstable but platform independent higher level SIMD APIs. Enabling those requires using Rust nightly. Thus, when b…