id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
12923 Comparison of vectors is O(n) even in the simple cases hivert jason was "Comparison of large vectors in Sage is slow in a surprising way: even if all
the entries of the vectors are different, the cost is proportional to the
length of the vector instead of having constant cost !
{{{
sage: l = 1000; m0 = vector(ZZ, [0]*l); m1 = vector(ZZ, [1]*l)
sage: %timeit m0 == m1
625 loops, best of 3: 656 盜 per loop
sage: l = 10000; m0 = vector(ZZ, [0]*l); m1 = vector(ZZ, [1]*l)
sage: %timeit m0 == m1
125 loops, best of 3: 5.66 ms per loop
sage: l = 100000; m0 = vector(ZZ, [0]*l); m1 = vector(ZZ, [1]*l)
sage: %timeit m0 == m1
5 loops, best of 3: 59.1 ms per loop
}}}
This seems to affect all the dense vectors independently from the base ring." defect closed major sage-5.3 linear algebra fixed vector equality days38 mguaypaq sage-5.3.beta0 Florent Hivert Travis Scrimshaw N/A