1. An apparatus for selecting an optimal pulse vector from a pulse vector codebook, wherein the optimal pulse vector is used by a linear prediction coder to encode a residual waveform, the apparatus comprising: an impulse response generator for generating an impulse response vector; a cross-correlation element configured to determine a cross-correlation vector relating the impulse response vector to a plurality of target signal samples from a filter, wherein the cross-correlation vector is used to determine a plurality of pulse positions such that the insertion of the plurality of pulse positions into the cross-correlation vector provides a predetermined number of high cross-correlation values; a pulse codebook generator configured to receive an indication signal indicative of the plurality of pulse positions from the cross-correlation element, and to output a plurality of pulse vectors in response to the indication signal, wherein the plurality of pulse vectors is a subset of the pulse vector codebook; and an energy computation element for determining an autocorrelation sub-matrix based upon the subset of the pulse vector codebook, wherein the autocorrelation sub-matrix and the cross-correlation vector are used to select the optimal pulse vector from the codebook.