Nitpick: is that really computing 20M digits correctly? Reading the code gives me the impression that this does all float computations in 20 million digits (or 20 million-ish? If BigFloat internally is binary, it might use a bit more), but I would expect that you need to compute using a few more digits to avoid rounding errors in the last digits.
Edit: also, reading https://stackoverflow.com/a/67919533, it seems you can do
BigFloat(π, precision=20000000)
How does that perform?