bugGNU Octave - Bugs: bug #42314, Matrix transpose multiply...


bug #42314: Matrix transpose multiply performance regression

Submitter:  Ceral Paquet <octavebugs>
Submitted:  Wed 07 May 2014 08:59:30 PM UTC
Category:  Interpreter Severity:  4 - Important
Priority:  7 - High Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.0 Operating System:  * GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Tue 03 Feb 2015 08:34:09 PM UTC, comment #2: 

I checked in a change for bug #42716 which fixes this.  Closing report.

Rik <rik5>
Project Administrator
Thu 08 May 2014 03:02:18 AM UTC, comment #1: 

This is not a trick.  Since version 3.4 of Octave the parser is supposed to detect matrix transpose multiply.  What it should then do is simply pass the matrix, along with the transpose flag, to BLAS to perform the multiplication.  This is much faster than performing the transpose in Octave and then performing the multiplication with BLAS.

This worked in 3.4.X and 3.6.X, but apparently was broken with the 3.8.0 release.  There was work done on the parser during that time which I assume explains this.

I've marked the bug as confirmed and as a regression.

Rik <rik5>
Project Administrator
Wed 07 May 2014 08:59:30 PM UTC, original submission:  

This used to be an issue on MATLAB - see below.

>> A=randn(4000,3000);
>> b=randn(4000,1);
>> tic; q=A'*b; toc

Elapsed time is 0.697953 seconds.

>> tic; qq=(b'*A)'; toc

Elapsed time is 0.0830581 seconds.

>> norm(q-qq)

ans =    7.6550e-12

Is it a bug? I don't know. But it was fixed in MATLAB to make both equally fast.

Ceral Paquet <octavebugs>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by octavebugs (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.





    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-03 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2014-07-09 rik5 Severity3 - Normal 4 - Important
    2014-07-09 rik5 Dependencies- bugs #42716 is dependent
    2014-05-08 rik5 CategoryNone Interpreter
        Priority5 - Normal 7 - High
        Item GroupNone Regression
        StatusNone Confirmed
        Release3.8.1 3.8.0
        SummaryMatrix transpose multiply trick - performance bug? Matrix transpose multiply performance regression
        Carbon-Copy- Added jwe

    Back to the top

    Powered by Savane 3.9