File tree 2 files changed +4
-14
lines changed
2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -191,13 +191,7 @@ assert!(matches.matched(6));
191
191
192
192
### Usage: enable SIMD optimizations
193
193
194
- This crate provides an ` unstable ` feature that can only be enabled on nightly
195
- Rust. When this feature is enabled, the regex crate will use SIMD optimizations
196
- if your CPU supports them. No additional compile time flags are required; the
197
- regex crate will detect your CPU support at runtime.
198
-
199
- When ` std::arch ` becomes stable, then these optimizations will be enabled
200
- automatically.
194
+ SIMD optimizations are enabled automatically on Rust stable 1.27 and newer.
201
195
202
196
203
197
### Usage: a regular expression parser
Original file line number Diff line number Diff line change @@ -15,13 +15,9 @@ fn main() {
15
15
}
16
16
17
17
fn enable_simd_optimizations ( version : & str ) {
18
- // If we're using nightly Rust, then we can enable vector optimizations.
19
- // Note that these aren't actually activated unless the `unstable` feature
20
- // is enabled.
21
- //
22
- // We also don't activate these if we've explicitly disabled auto
23
- // optimizations. Disabling auto optimizations is intended for use in
24
- // tests, so that we can reliably test fallback implementations.
18
+ // We don't activate SIMD optimizations these if we've explicitly disabled
19
+ // them. Disabling auto optimizations is intended for use in tests, so that
20
+ // we can reliably test fallback implementations.
25
21
if env:: var_os ( "CARGO_CFG_REGEX_DISABLE_AUTO_OPTIMIZATIONS" ) . is_some ( ) {
26
22
return ;
27
23
}
You can’t perform that action at this time.
0 commit comments