-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
literal: auto enable SIMD on Rust stable 1.27+
This commit removes the need to use the `unstable` feature to enable SIMD optimizations. We add a "version sniffer" to the `build.rs` script to detect if Rust version 1.27 or newer is being used, and if so, enable the SIMD optimizations. The 'unstable' feature is now a no-op, but we keep it for backwards compatibility. We also may use it again some day.
- Loading branch information
1 parent
a90fbd2
commit e455d53
Showing
7 changed files
with
75 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
pub use self::imp::*; | ||
|
||
#[cfg(all( | ||
feature = "unstable", | ||
regex_runtime_teddy_avx2, | ||
any(target_arch = "x86_64"), | ||
target_arch = "x86_64", | ||
))] | ||
mod imp; | ||
|
||
#[cfg(not(all( | ||
feature = "unstable", | ||
regex_runtime_teddy_avx2, | ||
any(target_arch = "x86_64"), | ||
target_arch = "x86_64", | ||
)))] | ||
#[path = "fallback.rs"] | ||
mod imp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
pub use self::imp::*; | ||
|
||
#[cfg(all( | ||
feature = "unstable", | ||
regex_runtime_teddy_ssse3, | ||
any(target_arch = "x86", target_arch = "x86_64"), | ||
target_arch = "x86_64", | ||
))] | ||
mod imp; | ||
|
||
#[cfg(not(all( | ||
feature = "unstable", | ||
regex_runtime_teddy_ssse3, | ||
any(target_arch = "x86", target_arch = "x86_64"), | ||
target_arch = "x86_64", | ||
)))] | ||
#[path = "fallback.rs"] | ||
mod imp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#[cfg(target_arch = "x86_64")] | ||
pub mod avx2; | ||
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] | ||
#[cfg(any(target_arch = "x86_64"))] | ||
pub mod ssse3; |