  We investigate optical absorption spectra obtained through time-dependent
density functional theory (TD-DFT) based on nonempirical hybrid functionals
that are designed to correctly reproduce the dielectric function. The
comparison with state-of-the-art $GW$ calculations followed by the solution of
the Bethe-Sapeter equation (BSE-$GW$) shows close agreement for both the
transition energies and the main features of the spectra. We confront TD-DFT
with BSE-$GW$ by focusing on the model dielectric function and the local
exchange-correlation kernel. The present TD-DFT approach achieves the accuracy
of BSE-$GW$ at a fraction of the computational cost.
