flier / pyfasthash

Python Non-cryptographic Hash Library
Apache License 2.0
281 stars 52 forks source link

Improper detection of instruction set #48

Closed aschankler closed 3 years ago

aschankler commented 3 years ago

setup.py incorrectly enables instruction set extensions in two cases:

  1. As of 5f81262, all extensions are automatically enabled on an x64 cpu without the cpuid package. This guess is not always correct, but the user is never warned.
  2. The cpuid function _is_set returns strings 'YES' and '--' (both of which are truthy). This again enables all extensions, even if they are not present.