speed-up of the input seq preprocessing