ENH: Optimize Cpu feature detect in X86, fix for GCC on macOS (#16297)
ENH: Optimize Cpu feature detect in X86, fix for GCC on macOS (#16297)

* Fix cpu detection for X86, GCC, and macOS

* Optimize feature detection

Co-authored-by: Matti Picus <faf711dbf9cf26dd81c70c606be887f6131932db@gmail.com>
jakirkham/numpy,pbrod/numpy,mhvk/numpy,rgommers/numpy,rgommers/numpy,seberg/numpy,endolith/numpy,mattip/numpy,mhvk/numpy,abalkin/numpy,charris/numpy,mattip/numpy,endolith/numpy,grlee77/numpy,grlee77/numpy,pdebuyl/numpy,mattip/numpy,simongibbons/numpy,mattip/numpy,mhvk/numpy,charris/numpy,simongibbons/numpy,anntzer/numpy,mhvk/numpy,numpy/numpy,endolith/numpy,pbrod/numpy,jakirkham/numpy,jakirkham/numpy,numpy/numpy,abalkin/numpy,madphysicist/numpy,numpy/numpy,pbrod/numpy,pdebuyl/numpy,seberg/numpy,anntzer/numpy,pdebuyl/numpy,madphysicist/numpy,anntzer/numpy,endolith/numpy,seberg/numpy,pbrod/numpy,abalkin/numpy,simongibbons/numpy,madphysicist/numpy,grlee77/numpy,seberg/numpy,pbrod/numpy,pdebuyl/numpy,grlee77/numpy,madphysicist/numpy,madphysicist/numpy,simongibbons/numpy,charris/numpy,jakirkham/numpy,anntzer/numpy,jakirkham/numpy,rgommers/numpy,numpy/numpy,grlee77/numpy,rgommers/numpy,charris/numpy,simongibbons/numpy,mhvk/numpy