add automatic tiling optimization

Is this a mistake? To achieve the original intention, `fn` needs to be evaluated at once, just like the comment describes.