Hand optimized Nussinov.