I now built the exe and ran:
real 0m0.199s user 0m0.000s sys 0m0.014s
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.
I now built the exe and ran:
So 0.2s for 10k files on the worst possible hardware/software scenario I could find nearby. Edited my original comment. Thanks!