Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Accelerating for-loop

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 $3^{3^2} = 19683$ such matrices in M, which the computers nowadays can do within a few seconds, but if $n=4$, there are already $4^{4^2} ≈ 4.3\cdot10^9$ matrices in M to check. Is there a faster way to make this possible, for example by parallelization?

Accelerating for-loop

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 $3^{3^2} = 19683$ such matrices in M, which the computers nowadays can do within a few seconds, but if $n=4$, there are already $4^{4^2} ≈ 4.3\cdot10^9$ matrices in M to check. check, but I except only about 100 hits (i.e. number of m for which the condition is true). Is there a faster way to make this possible, for example by parallelization?

Accelerating for-loop

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 $3^{3^2} = 19683$ such matrices in M, which the computers nowadays can do within a few seconds, but if $n=4$, there are already $4^{4^2} ≈ 4.3\cdot10^9$ matrices in M to check, but I except expect only about 100 hits (i.e. number of m for which the condition is true). Is there a faster way to make this possible, for example by parallelization?

Accelerating for-loop

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 $3^{3^2} = 19683$ such matrices in M, which the computers nowadays can do within a few seconds, but if $n=4$, there are already $4^{4^2} ≈ 4.3\cdot10^9$ matrices in M to check, but I expect only about 100 hits (i.e. number of such m for which the condition is true). Is there a faster way to make this possible, for example by parallelization?