class property galois.FieldArray.ufunc_mode : 'jit-lookup' | 'jit-calculate' | 'python-calculate'

The current ufunc compilation mode for this FieldArray subclass.

Notes

The ufuncs may be recompiled with compile().

Examples

Fields with order less than \(2^{20}\) are compiled, by default, using lookup tables for speed.

In [1]: galois.GF(65537).ufunc_mode
Out[1]: 'jit-lookup'

In [2]: galois.GF(2**16).ufunc_mode
Out[2]: 'jit-lookup'

Fields with order greater than \(2^{20}\) are compiled, by default, using explicit calculation for memory savings. The field elements and arithmetic must still fit within numpy.int64.

In [3]: galois.GF(2147483647).ufunc_mode
Out[3]: 'jit-calculate'

In [4]: galois.GF(2**32).ufunc_mode
Out[4]: 'jit-calculate'

Fields whose elements and arithmetic cannot fit within numpy.int64 use pure-Python explicit calculation.

In [5]: galois.GF(36893488147419103183).ufunc_mode
Out[5]: 'python-calculate'

In [6]: galois.GF(2**100).ufunc_mode
Out[6]: 'python-calculate'