Hacker News new | ask | show | jobs
by Shadonototra 1520 days ago

    Accurately assigning QoS classes to tasks ensures that your app is both responsive and energy efficient on all Macs. On Apple silicon, a task’s QoS class influences whether the system runs that task on a performance core (P core) or efficiency core (E core). For example, the system is more likely to run Background tasks on E cores to maximize battery life. If you don’t assign QoS classes, your app’s responsiveness and efficiency may suffer as a result.

    If you manually configure your thread’s priority using pthread_setschedparam, setpriority, or thread_set_policy, transition to APIs that set QoS classes instead. For example, use the pthread_set_qos_class_self_np function to set the QoS class of your POSIX threads.

https://developer.apple.com/documentation/apple-silicon/tuni...