2 ms per 10 files is a huge amount of time.
I now built the exe and ran:
real 0m0.199s
user 0m0.000s
sys 0m0.014s
So 0.2s for 10k files on the worst possible hardware/software scenario I could find nearby. Edited my original comment. Thanks!It is still a ton of time, about an order of magnitude more than optimal if the real/sys time split is to be believed.