What was the Nim version? I'm guessing it's devel since otherwise mine would be fairly slower.
Also this is something people tend to miss but clang instead of gcc might be faster. It's the same compiler architecture as Rust which is faster without memfiles.