In the previous post, we have seen how LockSupport.parkNanos() is implemented on Linux, what behavior to expect, and how we can tune it. The post was well-received and a few people asked how parkNanos() behaves on Windows. I've used Linux as a daily driver for over a decade and I didn't feel like exploring Windows. It's a closed-source operating system, and that makes it hard to explore it. Moreover, my knowledge of Windows API is virtually non-existent and I felt the learning curve would be too steep to justify the time investment.
However, Tomasz Gawęda re-ran my experiment on Windows 10 and shared his results on Twitter: LockSupport.parkNanos(55_000) took about 1.5 ms on his Windows 10 box. Just a reminder: it took about 100 μs on my Linux box. That's an order of magnitude difference and this really caught my attention!
from DZone.com Feed https://ift.tt/2T2yBSy
No comments:
Post a Comment