More efficient test matrix generation.