Skip to content

Commit 77140e7

Browse files
committed
doc: SIMD is enabled automatically
This was done in #490, but the documentation wasn't updated. Closes #491
1 parent 5fd3bd1 commit 77140e7

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

README.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,7 @@ assert!(matches.matched(6));
191191

192192
### Usage: enable SIMD optimizations
193193

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.
201195

202196

203197
### Usage: a regular expression parser

build.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@ fn main() {
1515
}
1616

1717
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.
2521
if env::var_os("CARGO_CFG_REGEX_DISABLE_AUTO_OPTIMIZATIONS").is_some() {
2622
return;
2723
}

0 commit comments

Comments
 (0)