What's the fastest way to get the phase angle and amplitude of a COSINUS 50hz signal?
Depending on how the signal will look like you can get away with only two or three samples:

$$
y(t) = A + B \cos(\omega t + \theta)
$$

If you know what the main value, $A_0$, would be, then only two samples would be required. Namely the cosine, shifted by a phase angle $\theta$, can be rewritten as a linear combination of a unshifted sine and cosine:

$$
y(t) = A_0 + A_1 \cos(\omega t) + B_1 \cos(\omega t) = A_0 + \sqrt{A_1^2 + B_1^2} \cos\left(\omega t - \tan^{-1}{\frac{A_1}{B_1}}\right)
$$

The gains can be solved for by solving the following linear system of equations:

$$
\begin{bmatrix}
1 &amp; \sin \theta_0 &amp; \cos \theta_0 \\
1 &amp; \sin \theta_1 &amp; \cos \theta_1 \\
1 &amp; \sin \theta_2 &amp; \cos \theta_2
\end{bmatrix}
\begin{bmatrix}
A_0 \\
A_1 \\
B_1
\end{bmatrix}
=
\begin{bmatrix}
y_0 \\
y_1 \\
y_2
\end{bmatrix}
$$

where $\theta_i=2\pi f(t_0+i\Delta t)$, with $f=50\ Hz$ and the $t_0+i\Delta t$ are the consecutive moments in time used for for the three measurements and $y_i$ is the measured signal at those moments in time. The values found for $A_0$, $A_1$ and $B_1$ can then be used to find the constants of the initial equation, namely:

$$
A = A_0
$$

$$
B = \sqrt{A_1^2 + B_1^2}
$$

$$
\theta = -\tan^{-1}{\frac{A_1}{B_1}}
$$

This should work for any different points in time, which are not a multiple of the period of the signal spaced apart, however this does assume that there is no noise present in the signal. If there is noise then you might want to consider using more points and performing a least squares method. Also a shorter sample time/higher sample rate would make these calculations more sensitive to the noise, but you will be able to take more samples in the same amount of time.