pitrou opened a new issue, #37623:
URL: https://github.com/apache/arrow/issues/37623

   ### Describe the enhancement requested
   
   In #37610 we had to guard some code paths on the presence of the BMI2 
instruction sets, because those code paths use two BMI2 instrinsics (the PDEP 
and PEXT instructions) that are not efficiently implemented on all modern x86 
CPUs (and that can be absent on a few rare ones).
   
   However, we already have a reasonably good software emulation of PEXT [in 
another 
place](https://github.com/apache/arrow/blob/a8a604cfc5bc8d05ca3b1ef1388e6efd8ba6e5cd/cpp/src/parquet/level_conversion_inc.h#L37-L257)
 and it should be relatively easy to write a software emulation of PDEP using 
the exact same approach (lookup table to process 5 bits at a time).
   
   This would allow re-enabling the aforementioned codepaths on all CPUs 
supporting AVX2, even if they don't have an (efficient) BMI2 implementation.
   
   This includes AMD CPUs since at least 2017.
   
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to