Open in CoCalc
p = 7 F.<a> = GF(p^2) %timeit a*a %timeit a+a
625 loops, best of 3: 94.6 ns per loop 625 loops, best of 3: 106 ns per loop
K = GF(p).algebraic_closure() G = K.subfield(2)[0] b = G.gen() %timeit b*b %timeit b+b
625 loops, best of 3: 95.7 ns per loop 625 loops, best of 3: 106 ns per loop