Using a toy script from https://github.com/msys2/MINGW-packages/issues/22917 this reduces the time it takes from 723.7 ms to 670.4 ms on my PC.
The patches for this package are auto generated and managed in git: https://github.com/msys2-contrib/cpython-mingw
Run ./update-patches.sh to re-create the patches.