Optimizing a reed-solomon encoder (polynomial division)
问题 I am trying to optimize a Reed-Solomon encoder, which is in fact simply a polynomial division operation over Galois Fields 2^8 (which simply means that values wrap-around over 255). The code is in fact very very similar to what can be found here for Go: http://research.swtch.com/field The algorithm for polynomial division used here is a synthetic division (also called Horner's method). I tried everything: numpy, pypy, cython. The best performance I get is by using pypy with this simple nested