Anybody has a rough idea how I should set the order of QuadGK for a standard mass matrix element calculation (Lagrange element) with order `p^2` and `BigFloat` precision `N`

`It is advisable to increase the integration order in rough proportion to the precision, for smooth integrands.`
and it is not very clear so me. Say I want `p=20` and `N=1000`, then what order for the quadrature should I set?
Bad choice of notation from my part `N` here is the precision of BigFloat in bits, I need to do many different runs with varying number of bits, some over 3000 bits. I need to do for varying order of the Lagrange polynomials (up to maybe p=50, doing up to 20 now). Code works fine but already at p=7 it is very slow. We are talking about 12 hours for a tiny matrix (mixing up questions now, ignore the size of the matrix, here I am talking about the specific elements for assembly, in other parts of the code I am computing the eigenvalues which is of course not related) maybe 256 bit precision and p=10. In documentation of QuadGK https://juliamath.github.io/QuadGK.jl/stable/
So my question is: For a given `p` and `N`, what would be an appropriate argument `order=x` to the function `quadgk` to make it faster, I assume it is slow because it is adaptively increasing this order. I could always try but since one run is about 12h it is a bit awkward 