Optimize getndelim2 to use block operations when possible.