Reuse matrices to minimize dynamic allocation