Hello,

I've been recently doing some work which requires linear algebra over
fraction fields of polynomial rings.  I found that this is _much_
slower than it should be.

sage: hlqp5 = [ symmetrica.hall_littlewood(p) for p in Partitions(5) ]

sage: hlqp5_m = matrix([[ x.coefficient(p) for p in Partitions(5) ]
for x in hlqp5])

sage: hlqp5_m.parent()
Full MatrixSpace of 7 by 7 dense matrices over Polynomial Ring in x
over Integer Ring

sage: time hlqp5_i = hlqp5_m^(-1)
CPU times: user 1.06 s, sys: 0.19 s, total: 1.26 s
Wall time: 1.42

sage: prun hlqp5_i = hlqp5_m^(-1)
         570758 function calls (570193 primitive calls) in 2.817 CPU seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     7234    0.184    0.000    0.586    0.000 pexpect.py:914(expect_list)
     7234    0.166    0.000    1.302    0.000 expect.py:549(_eval_line)
     7234    0.125    0.000    1.634    0.000 singular.py:325(eval)
    14468    0.109    0.000    0.109    0.000 {posix.write}
     4398    0.101    0.000    0.127    0.000
multi_polynomial_element.py:277(__init__)
     7269    0.099    0.000    0.296    0.000 pexpect.py:498(read_nonblocking)
     7234    0.090    0.000    1.435    0.000 expect.py:637(eval)
...


I'm not sure why the slow pexpect interface is being used, but I
definitely thing it shouldn't be.  I haven't been able to track down
where it is being introduced.  Does someone more familiar with this
area know why this is happening?

Thanks,
Mike

P.S.  Does SAGE already have an efficient way to obtain the inverse of
a matrix that is known to be upper or lower triangular in advance?

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to