Skip Menu |

This queue is for tickets about the Math-Matrix CPAN distribution.

Report information
The Basics
Id: 42919
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Math-Matrix

People
Owner: ULPFR [...] cpan.org
Requestors: INFIDEL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.5
Fixed in: (no value)



Subject: Performance patch for transpose()
In a recent discussion on perlmonks (http://perlmonks.org/?node_id=739466), 'oshalla' came up with a a faster transpose() implementation than the one in Math::Matrix. Being as I borrowed your transpose() code from this module initially, I felt it only fitting that I should pass the performance patch back up to you :-) It seems to provide about a 3-4x speed increase over the implementation currently in Math::Matrix over all sizes of test matrices that both he and I tried it upon. -------- snip -------- sub transpose_gmch { my ($matrix) = shift ; my @result = () ; my $lc = $#{$matrix->[0]} ; for my $col (0..$lc) { push @result, [map $_->[$col], @$matrix] ; } ; return( \@result ); }
Subject: Performance patch for transpose() integrated in Math-Matrx-0.7
RT-Send-CC: jgamble [...] ripco.com
Replaced transpose function in Math-Matrx-0.7