File tree Expand file tree Collapse file tree 3 files changed +465
-209
lines changed Expand file tree Collapse file tree 3 files changed +465
-209
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#![ cfg_attr( feature = "nightly" , feature( test) ) ]
2
2
3
3
#[ cfg( target_arch = "x86_64" ) ]
4
- pub use x86_64 :: encode_str;
4
+ pub use x86 :: encode_str;
5
5
6
6
#[ cfg( target_arch = "x86_64" ) ]
7
- mod avx2;
8
-
9
- #[ cfg( target_arch = "x86_64" ) ]
10
- mod x86_64 {
11
- #[ inline]
12
- pub fn encode_str < S : AsRef < str > > ( input : S ) -> String {
13
- // Runtime CPU feature detection for AVX2
14
- #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
15
- {
16
- if is_x86_feature_detected ! ( "avx2" ) {
17
- return crate :: avx2:: encode_str ( input) ;
18
- }
19
- }
20
-
21
- // Fallback to optimized non-SIMD implementation
22
- crate :: encode_str_fallback ( input)
23
- }
24
- }
7
+ mod x86;
25
8
26
9
const BB : u8 = b'b' ; // \x08
27
10
const TT : u8 = b't' ; // \x09
You can’t perform that action at this time.
0 commit comments