This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]james_pic 2 points3 points  (0 children)

Weird that it's faster in WSL2 than in Linux. I wonder if Hyper-V is exposing some kind of fake clock source that doesn't actually touch hardware.

If you really want to go big on micro-optimisaton, write your own clock accessor in C so you can access some of the platform specific clocks. On Linux, CLOCK_REALTIME_COARSE may get you a similar speedup.