Have you considered this modified method to compute Lr in decoder?
It may offer some speedup, although I haven't tested it.
def phi0(x):
x = abs(x)
if (x < 9.08e-5 ):
return( 10 );
else:
return -log (tanh (x/2))
def G(Lq):
X = sum (phi0(e) for e in Lq)
s = np.prod(np.sign(Lq))
return s * phi0(X)
Have you considered this modified method to compute Lr in decoder? It may offer some speedup, although I haven't tested it.