Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Are finite field computations slow?

I ran the following in Sage 4.5.3 on a MacBook Pro (running OSX):

p = 5;
pow = 2;
k = GF(5 ** pow, 'z');
f(x, y) = y^3 + y + 4*x;
def count_pts():
    retval = 0;
    for a in k:
        for b in k:
            if (f(a, b) == 0):
                retval = retval + 1;
    return retval + 1;

count_pts()

It took around 10-20 seconds to return the correct answer of 26. With pow = 1 it terminated much more quickly. The loop is only over 625 pairs of elements of GF(25); is there some reason this program runs so slowly? (And can the performance be improved?)