Ask Your Question

Frank's profile - activity

2024-02-18 21:02:38 +0200 received badge  Famous Question (source)
2024-02-18 21:02:38 +0200 received badge  Notable Question (source)
2024-02-18 21:02:38 +0200 received badge  Popular Question (source)
2015-01-13 18:17:19 +0200 received badge  Taxonomist
2013-09-10 22:00:03 +0200 asked a question 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?)