Opened 13 years ago

Closed 13 years ago

#5369 closed enhancement (fixed)

[with patch, positive review] Optimize transpose for matrix_integer_dense and matrix_rational_dense

Reported by: ylchapuy Owned by: was
Priority: major Milestone: sage-3.4
Component: linear algebra Keywords: transpose
Cc: rbeezer Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

matrix_integer_dense and matrix_rational_dense don't have any optimize transpose functions, so add it.

Attachments (2)

trac-5369-transpose-gmp-matrix.patch (7.9 KB) - added by ylchapuy 13 years ago.
trac-5369-transpose-gmp-matrix.2.patch (8.0 KB) - added by mhansen 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by ylchapuy

comment:1 Changed 13 years ago by ylchapuy

I did only one ticket for both as they are both gmp based.

I mostly copied the logic used in the copy function (by the way I also simplified the copy function in matrix_rational_dense.pyx)

timings (wall time) for

m=identity_matrix(3000);
time m2=m.transpose(); m3=m.antitranspose();
  • sage 3-3: 15.44
  • with #5345: 3.38
  • with this patch: 2.01

Changed 13 years ago by mhansen

comment:2 Changed 13 years ago by mhansen

  • Summary changed from [with patch, needs review] Optimize transpose for matrix_integer_dense and matrix_rational_dense to [with patch, positive review] Optimize transpose for matrix_integer_dense and matrix_rational_dense

Looks good. I updated the patch to the new docstring format in 3.4.

Apply only trac-5369-transpose-gmp-matrix.2.patch

comment:3 Changed 13 years ago by mabshoff

  • Milestone changed from sage-3.4.1 to sage-3.4
  • Resolution set to fixed
  • Status changed from new to closed

Merged trac-5369-transpose-gmp-matrix.2.patch in Sage 3.4.rc0.

Cheers,

Michael

Note: See TracTickets for help on using tickets.