|
发表于 2024-10-1 08:00:57
|
显示全部楼层
improve SuperSleepUntil implementation:
1) as found in lots of experiments done for the VPX and PinMAME projects, Sleep() on
windows can oversleep for over 1ms, especially when doing Sleep(>1)
2) thus loop Sleep(1) and end if its less than 2ms
3) in the spin to wait for the rest of the time, insert yield(=_mm_pause) or the determined by the Rust devs arm64 equivalent
this actually gets rid of micro-stutter on my AMD based minipc e.g. in Daytona2
then also use same Sleep() implementation in the network code (to avoid potential sideeffects between the 2 implementations)
https://github.com/trzy/Supermod ... d3903f5b233432515b3 |
|