I have a loop like
n = 3
M = MatrixSpace(Integers(n),n)
L = []
for m in M:
if condition:
L += [m]
In the case n=3, there are 332=19683 such matrices in M
, which the computers nowadays can do within a few seconds, but if n=4, there are already 442≈4.3⋅109 matrices in M
to check. Is there a faster way to make this possible, for example by parallelization?