Thanks for the tip on memory_mapping! It doesn't make an appreciable difference in this benchmark right now, but I'm glad to know the technique for other situations (or this one with smaller D).