Efficient spherical harmonic transforms aimed at pseudospectral numerical simulations