1. A method performed by an apparatus, said method comprising: identifying one or more target vectors from a plurality of candidate vectors, each candidate vector having sorted elements and being associated with a respective class of one or more code vectors of a codebook and at least one of said candidate vectors being associated with a respective class of two or more code vectors that comprise said respective candidate vector and at least one code vector obtainable from said respective candidate vector by one of permutation and signed permutation, said target vectors having, among all candidate vectors of said plurality of candidate vectors, smallest distances towards a at least sorted representation of an input vector, said identifying comprising: checking, for a candidate vector of said plurality of candidate vectors, at least based on a distance between said candidate vector and a reference vector and on a distance between said reference vector and said at least sorted representation of said input vector, if a distance between said at least sorted representation of said input vector and said candidate vector is larger than a distance between said at least sorted representation of said input vector and said reference vector; and computing, when said checking yields a negative result for said candidate vector, a distance between said at least sorted representation of said input vector and said candidate vector, wherein a negative result is given when the distance between said at least sorted representation of said input vector and said candidate vector is not larger than a distance between said at least sorted representation of said input vector and said reference vector.