mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 00:08:30 +00:00
Make improvements
- wcsstr() is now linearly complex - strstr16() is now linearly complex - strstr() is now vectorized on aarch64 (10x) - strstr() now uses KMP on pathological cases - memmem() is now vectorized on aarch64 (10x) - memmem() now uses KMP on pathological cases - Disable shared_ptr::owner_before until fixed - Make iswlower(), iswupper() consistent with glibc - Remove figure space from iswspace() implementation - Include line and paragraph separator in iswcntrl() - Use Musl wcwidth(), iswalpha(), iswpunct(), towlower(), towupper()
This commit is contained in:
parent
e1528a71e2
commit
7c83f4abc8
67 changed files with 5602 additions and 5165 deletions
|
@ -16,7 +16,6 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/bisect.internal.h"
|
||||
#include "libc/nexgen32e/x86info.h"
|
||||
|
||||
static int CmpX86ProcModelKey(const struct X86ProcessorModel *a,
|
||||
|
@ -32,7 +31,8 @@ static int CmpX86ProcModelKey(const struct X86ProcessorModel *a,
|
|||
* @see https://a4lg.com/tech/x86/database/x86-families-and-models.en.html
|
||||
*/
|
||||
const struct X86ProcessorModel *getx86processormodel(short key) {
|
||||
return bisect(&(struct X86ProcessorModel){key}, kX86ProcessorModels,
|
||||
kX86ProcessorModelCount, sizeof(struct X86ProcessorModel),
|
||||
(void *)CmpX86ProcModelKey, NULL);
|
||||
for (int i = 0; kX86ProcessorModels[i].key; ++i)
|
||||
if (kX86ProcessorModels[i].key == key)
|
||||
return &kX86ProcessorModels[i];
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue