Skip to content

Instantly share code, notes, and snippets.


Wu Yongwei adah1972

View GitHub Profile
adah1972 / ordering.cpp
Created Dec 22, 2019
Intel CPU reordering example made to work on macOS
View ordering.cpp
// Jeff Preshing's example that shows the reordering of Intel CPUs made to
// work on both Linux and macOS.
// Original source:
// Apple semaphore change is based on the answer by dho at:
adah1972 /
Last active Feb 4, 2022
Decorator for using dicts/lists with any Python cache function (like lru_cache)
# Inspired by
from collections import namedtuple
import functools
import json
import six
Serialized = namedtuple('Serialized', 'json')