Skip to content

Commit affe462

Browse files
committed
Use cython.no_gc to speed up nmod
1 parent 8c2221b commit affe462

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/flint/types/nmod.pyx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cimport cython
2+
13
from flint.flint_base.flint_base cimport flint_scalar
24
from flint.utils.typecheck cimport typecheck
35
from flint.types.fmpq cimport any_as_fmpq
@@ -193,6 +195,7 @@ cdef class nmod_ctx:
193195
return self._new(&v)
194196

195197

198+
@cython.no_gc
196199
cdef class nmod(flint_scalar):
197200
"""
198201
The nmod type represents elements of Z/nZ for word-size n.

0 commit comments

Comments
 (0)