id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
9540 Testing whether a Gaussian integer is in ZZ is extremely slow fredrik.johansson AlexGhitza "{{{
sage: x = 5
sage: y = 3/5
sage: z = (5+I).pyobject()
sage: z.parent()
Number Field in I with defining polynomial x^2 + 1
sage: %timeit x in ZZ
625 loops, best of 3: 103 ns per loop
sage: %timeit y in ZZ
625 loops, best of 3: 7.19 µs per loop
sage: %timeit z in ZZ
625 loops, best of 3: 381 µs per loop
}}}
By extension, this massively affects performance of the ._is_integer() method for symbolic expressions containing complex numbers." defect new major basic arithmetic N/A