  We prove a conjectural vanishing result for Gopakumar--Vafa invariants of
quintic 3-folds, referred to as Castelnuovo bound in the literature.
Furthermore, we calculate Gopakumar--Vafa invariants at Castelnuovo bound
$g=\frac{d^2+5d+10}{10}$. As physicists showed, these two properties allow us
to compute all Gromov--Witten invariants of quintic 3-folds up to genus $53$,
provided that the conifold gap condition holds. We also give a bound for the
genus of any one-dimensional closed subscheme in a smooth hypersurface of
degree $\leq 5$, which may be of independent interest.
