<commit_before># cpuid
### Intel CPUID library for Go Programming Language

Package cpuid provides access to information available with 
processor CPUID instruction. 
Package gatheres all information during package initialization phase 
so its public interface doesn't call CPUID intstruction.
It allows to use this library for the optimization purposes as CPUID instruction
can have some performance related side effects.


[![GoDoc][1]][2]
[1]: https://godoc.org/github.com/intel-go/cpuid?status.svg
[2]: https://godoc.org/github.com/intel-go/cpuid

### You can get it with

    go get github.com/intel-go/cpuid

### Example:

    package main
    import (
	     "github.com/intel-go/cpuid"
	     "fmt"
    )
    
    func main() {
      	fmt.Printf("VendorString:   %s\n", cpuid.VendorIdentificatorString)
      
      	fmt.Printf("Features: ")
      	for i := uint64(0); i < 64; i++ {
      		if cpuid.HasFeature(1 << i) {
      			fmt.Printf("%s ", cpuid.FeatureNames[1<<i])
      		}
      	}
      	fmt.Printf("\n")
      
      	fmt.Printf("ExtendedFeatures: ")
      	for i := uint64(0); i < 64; i++ {
      		if cpuid.HasExtendedFeature(1 << i) {
      			fmt.Printf("%s ", cpuid.ExtendedFeatureNames[1<<i])
      		}
      	}
      	fmt.Printf("\n")
      
      	fmt.Printf("ExtraFeatures: ")
      	for i := uint64(0); i < 64; i++ {
      		if cpuid.HasExtraFeature(1 << i) {
      			fmt.Printf("%s ", cpuid.ExtraFeatureNames[1<<i])
      		}
      	}
      	fmt.Printf("\n")
    }

### API description
Most of data available with simple variables:
 
* **SteppingId uint32** Processor Stepping ID
* **ProcessorType uint32** Processor type
* **DisplayFamily uint32** Processor family
* **DisplayModel uint32** Processor model
* **CacheLineSize uint32** Cache line size in bytes
* **MaxLogocalCPUId uint32** Maximum number of addressable IDs for logical processors in this physical package
* **InitialAPICId uint32** Initial APIC ID
* **CacheDescriptors []CacheDescriptor** Cache descriptor's array

You can iterate them like there
     
        for _, cacheDescription := range cpuid.CacheDescriptors {
            fmt.Printf("CacheDescriptor: %v\n", cacheDescription)
        }

* **MonLineSizeMin uint32** Smallest monitor-line size in bytes (default is processor's monitor granularity) 
* **MonLineSizeMax uint32** Largest monitor-line size in bytes (default is processor's monitor granularity)
* **MonitorEMX bool** Enumeration of Monitor-Mwait extensions availability status
* **MonitorIBE bool** Supports treating interrupts as break-event for MWAIT flag<commit_msg>Fixed some typos and editing for README<commit_after># cpuid
### Intel CPUID library for Go Programming Language

The cpuid package provides convenient and fast access to information from 
the x86 CPUID instruction. 
The package gathers all information during package initialization phase 
so its public interface will not need to execute the CPUID instruction at runtime.
Frequent calls to the CPUID instruction can hurt performance, 
so this package makes it easier to do CPU-specific optimizations.


[![GoDoc][1]][2]
[1]: https://godoc.org/github.com/intel-go/cpuid?status.svg
[2]: https://godoc.org/github.com/intel-go/cpuid

### You can get it with

    go get github.com/intel-go/cpuid

### Example:

    package main
    import (
	     "github.com/intel-go/cpuid"
	     "fmt"
    )
    
    func main() {
      	fmt.Printf("VendorString:   %s\n", cpuid.VendorIdentificatorString)
      
      	fmt.Printf("Features: ")
      	for i := uint64(0); i < 64; i++ {
      		if cpuid.HasFeature(1 << i) {
      			fmt.Printf("%s ", cpuid.FeatureNames[1<<i])
      		}
      	}
      	fmt.Printf("\n")
      
      	fmt.Printf("ExtendedFeatures: ")
      	for i := uint64(0); i < 64; i++ {
      		if cpuid.HasExtendedFeature(1 << i) {
      			fmt.Printf("%s ", cpuid.ExtendedFeatureNames[1<<i])
      		}
      	}
      	fmt.Printf("\n")
      
      	fmt.Printf("ExtraFeatures: ")
      	for i := uint64(0); i < 64; i++ {
      		if cpuid.HasExtraFeature(1 << i) {
      			fmt.Printf("%s ", cpuid.ExtraFeatureNames[1<<i])
      		}
      	}
      	fmt.Printf("\n")
    }

### API description
Most data is available with simple variables:
 
* **SteppingId uint32** Processor Stepping ID
* **ProcessorType uint32** Processor type
* **DisplayFamily uint32** Processor family
* **DisplayModel uint32** Processor model
* **CacheLineSize uint32** Cache line size in bytes
* **MaxLogocalCPUId uint32** Maximum number of addressable IDs for logical processors in this physical package
* **InitialAPICId uint32** Initial APIC ID
* **CacheDescriptors []CacheDescriptor** Cache descriptor's array

You can iterate over them as follows:
     
        for _, cacheDescription := range cpuid.CacheDescriptors {
            fmt.Printf("CacheDescriptor: %v\n", cacheDescription)
        }

* **MonLineSizeMin uint32** Smallest monitor-line size in bytes (default is processor's monitor granularity) 
* **MonLineSizeMax uint32** Largest monitor-line size in bytes (default is processor's monitor granularity)
* **MonitorEMX bool** Enumeration of Monitor-Mwait extensions availability status
* **MonitorIBE bool** Supports treating interrupts as break-event for MWAIT flag
{'fraction_non_alphanumeric': 0.11443829868395956, 'fraction_numerical': 0.016784283806980736, 'mean_word_length': 3.1818181818181817, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5461595', 'n_tokens_mistral': 1650, 'n_tokens_neox': 1589, 'n_words': 478}