Preface: I am that kind of nutcase that likes to write assembly now and
then. I did however find it a bit annoying to have to do cpu feature
detection, and looked for a library for it. The only one I could find,
however relied on cgo, and since that can be a off-putting to use in a
library, I decided to write a simple library for that, which - as a side
bonus - now also includes detection of modern instructions.
Purpose: Runtime detection of CPU features.
Features: Detects CPU name, vendor, cpu model&family, supported instruction
classes, cache line size, physical & logical core count on i386 and amd64
Status: First release, there *may* be detection errors, since I don't have
access to the most modern CPUs. But if anything pops up, just open an issue
on the project. Also note that if you are running things in a VM, it may
hide some CPU features, so if you find something that doesn't match your
expectation, be sure you are not running in a VM.
Project home: https://github.com/klauspost/cpuid
Comments, bugs and feedback is of course very welcome.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.