optimize residual writing by moving conditional to outside of loop. patch by Prakash Punnoor <prakash punnoor de>.
optimize residual writing by moving conditional to outside of loop. patch by Prakash Punnoor <prakash punnoor de>.

justinruggles/flake,justinruggles/flake,justinruggles/flake