mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-18 04:04:42 -04:00
Avoid nanosecond abstraction to reduce math operations. Replace Sleep(0) with YieldProcessor(). We want the thread to remain scheduled, the current CPU core to do less work, and the hyperthread sibling to perform better. Hacky profiling showed maybe 10-25 µs skid reduction per function call. I think power/performance gains would be hard to measure, so I haven't tried, but it would be shocking if they got worse.