Skip to content

Detect CPU via "cpuid" instruction instead of "/proc/cpuinfo".

The following discussion from !65 (closed) should be addressed:

For the record, I found a couple of interesting resources:

One could write a tiny dynamic library (see https://stackoverflow.com/a/4823889) and call it from Python with ctypes. The .so could be distributed as a binary (it's very portable), or we take the PyCPUID approach, in which case I would try to just fix the Python 3 issue.

I experimented a bit with a mix of the approaches, and it is actually relatively easy to have something minimal that fits our needs.