@@ -77,10 +77,12 @@ impl<'a> Writer<'a> {
7777
7878 #[ inline( always) ]
7979 pub fn extend_from_window ( & mut self , window : & super :: window:: Window , range : Range < usize > ) {
80- #[ cfg( target_arch = "x86_64" ) ]
81- if crate :: cpu_features:: is_enabled_avx512 ( ) {
82- return self . extend_from_window_help :: < core:: arch:: x86_64:: __m512i > ( window, range) ;
83- }
80+ // NOTE: the dynamic check for avx512 makes avx2 slower. Measure this carefully before re-enabling
81+ //
82+ // #[cfg(target_arch = "x86_64")]
83+ // if crate::cpu_features::is_enabled_avx512() {
84+ // return self.extend_from_window_help::<core::arch::x86_64::__m512i>(window, range);
85+ // }
8486
8587 #[ cfg( target_arch = "x86_64" ) ]
8688 if crate :: cpu_features:: is_enabled_avx2 ( ) {
@@ -138,10 +140,12 @@ impl<'a> Writer<'a> {
138140
139141 #[ inline( always) ]
140142 pub fn copy_match ( & mut self , offset_from_end : usize , length : usize ) {
141- #[ cfg( target_arch = "x86_64" ) ]
142- if crate :: cpu_features:: is_enabled_avx512 ( ) {
143- return self . copy_match_help :: < core:: arch:: x86_64:: __m512i > ( offset_from_end, length) ;
144- }
143+ // NOTE: the dynamic check for avx512 makes avx2 slower. Measure this carefully before re-enabling
144+ //
145+ // #[cfg(target_arch = "x86_64")]
146+ // if crate::cpu_features::is_enabled_avx512() {
147+ // return self.copy_match_help::<core::arch::x86_64::__m512i>(offset_from_end, length);
148+ // }
145149
146150 #[ cfg( target_arch = "x86_64" ) ]
147151 if crate :: cpu_features:: is_enabled_avx2 ( ) {
0 commit comments