speed up nf computation