Why does perf-literal
requires std
?
#1147
-
Enabling
First part should be fairly easy to fix. My question is - why does |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I created a PR for (1): #1148 For (2), that is an interesting question. The purpose of the But why doesn't But still, I think one could make the argument that features like I think the main issue here is that this is one giant cluster fuck and it's overall very difficult for end users to know which features to enable. Still, the problem is hardly confined to So I think here is what I propose:
|
Beta Was this translation helpful? Give feedback.
I created a PR for (1): #1148
For (2), that is an interesting question. The purpose of the
perf-literal-*
features is to enable the use of SIMD when searching. And for theaho-corasick
crate, it needs to depend on std to enable SIMD. The reason is that CPU feature detection is only available in std, and that's needed to introspect (at least on x86-64) whether the necessary ISA extensions are available to employ SIMD. Ifstd
isn't enabled, then probably there isn't much point in enablingperf-literal-multistring
.But why doesn't
perf-literal-substring
also enablestd
? Well, in that case, the crate providing SIMD ismemchr
. And in that case, the algorithms are sufficiently simple enough tha…