Should be under 5 seconds in C or C++ using gmp
From looking at the code, the overhead will be from repeatedly invoking git as a subprocess.
From looking at the code, the overhead will be from repeatedly invoking git as a subprocess.