A method and system for optimizing coding gain that alters the backsearch
buffer length and/or the input buffer length of a decoder in response to
one or more transmission performance characteristics of the system. The
performance characteristics are monitored to determine the performance of
the system. The measured transmission performance characteristics are
used to control the lengths of the backsearch buffer and the input
buffer. The measured transmission performance characteristics along with
the backsearch length and/or the input buffer length are analyzed and
compared with simulated decoding results. In accordance with the
simulated results, the system determines the optimal size of the
backsearch buffer and the input buffer needed to achieve a desired
performance target. The system adjusts the size of the backsearch buffer
length and/or the input buffer length to equal the determined optimal
lengths.