What is the smartest way to compute the genus of a hyperelliptic curve $C: y^2 = f(x)$ (with $f$ a separable polynomial of degree $n> 3$ over a field $k = \bar{k}$ of characteristic $0$ (prob. characteristic unequal $2$ is enough). (Just to be precise, I am referring to the unique nonsingular curve proper over $k$ defined by this equation.)

There are two ways I can think of, but neither is very clean. I'm wondering if this can (or cannot?) be avoided.

$\textbf{More detail:}$

We have the equation $z^{n-2}y^2 = z^n f(x/z) \subset \mathbb{P}^2$. Just to be precise, let's call this singular planar model of $C$ by $D$. The rational map from $\phi: \mathbb{P}^2 \rightarrow \mathbb{P}^1: (x,y,z) \mapsto (x,z)$ is of degree $2$ on $D$, and well-defined on the curve $D$ (except at the point $(x,y,z) = (0,1,0)$). Computing the ramification (outside this point, which is the unique singular point of $D$) is trivial, the entire issue is really just to determine the ramification at the (blow-up) of this point.

Note that the image of $\phi|_D$ is the complement of the point $(1,0) \in \mathbb{P}^1$.

$\textbf{Method 1}$: We can blow up the unique singular point $(0,1,0) \in D$ enough times, find the number of points of the strict transform, and that settles the issue. Even if the degree of $f$, $n$ is $6$ this seems like a lot of work!

$\textbf{Method 2}$: Let $P = (0,1,0)$. Then, compute the invariant $\delta_P$, where $\delta_P = \textrm{length}( \tilde{\mathcal{O}}_{D,P}/ \mathcal{O}_{D,P})$. Then, $p_a(D) - \delta_P(D) = p_a(C)$. It's of course easy to compute the arithmetic genus $p_a$ of $D$, since this we can change to a non singular element of the relevant linear system, and then compute the genus of a ns planar curve. But, is it easy to compute $\delta_P$?

What's the easiest way to compute the genus?