This code seems to have a linear complexity of 110, which is not practical in any way. In the body of the question, the OP complains
It is not clear what exactly the 'certain time code' is, but I will take it to mean a finite-length sequence $s_0, s_1, \ldots, s_$ used by the Berlekamp-Massey algorithm.