Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

memory increasing when generating lots of hyperelliptic curves (without storing them)

Executing the code given below (it generates hyperelliptic curves), the used memory increases all the time. Since nothing is stored permanently, this should not happen. How do I avoid it? (It is not really a problem with the example given, but using more loops, it becomes a problem.)

Here an example code:

F = GF(4, 'a')
R.<t> = PolynomialRing(F)

for x in F:
    for y in F:
        for z in F:
            h = x*t^2 + y*t + z

            for a in F:
                for b in F:
                    for c in F:
                        for d in F:
                            for e in F:
                                f = t^5 + a*t^4 + b*t^3 + c*t^2 + d*t + e

                                C = HyperellipticCurve(f,h)