bugGNU Octave - Bugs: bug #40268, Octave row max is slow on sparse...

 
 

bug #40268: Octave row max is slow on sparse matrices

Submitted by:  David Spies <dspyz>
Submitted on:  Mon 14 Oct 2013 06:22:44 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Performance
Status: FixedAssigned to: David Bateman <dbateman>
Originator Name: dspyzOpen/Closed: Closed
Release: 3.2.4Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 18 Oct 2013 09:47:00 PM UTC, comment #4:

Ok, I found a small bug in my previous patch and after testing it seems to work fine. The speed of max(s,[],2) is now very similar to max(s,[],1). See the changeset

http://hg.savannah.gnu.org/hgweb/octave/rev/8a54a481ecb5

D.

David Bateman <dbateman>
Project MemberIn charge of this item.
Fri 18 Oct 2013 12:30:34 AM UTC, comment #3:

Attached is an attempt to fix this speed problen, however its too late here to extensively test the patch before committing it. Someone want to test it ?

D.

(file #29397)

David Bateman <dbateman>
Project MemberIn charge of this item.
Thu 17 Oct 2013 10:51:19 PM UTC, comment #2:

The min/max function is looking for the first zero element in each row of the sparse matrix and is doing this with an expensive triple loop in dSparse.cc. I'm looking at it, but don't quite see the best way around this speed problem. I'd rather not just transpose the problem, as that creates a copy the original matrix which might be a bad thing if the matrix is large.

David

David Bateman <dbateman>
Project MemberIn charge of this item.
Thu 17 Oct 2013 10:32:56 PM UTC, comment #1:

This bug also affects the dev version

David Spies <dspyz>
Mon 14 Oct 2013 06:22:44 PM UTC, original submission:

t = sparse(100000,100000);
v = max(t,[],2);

This operation seems to hang but

v = max(t',[],1)';

doesn't

David Spies <dspyz>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29397:  patch.rowmax added by dbateman (5KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dbateman (Posted a comment)
  • -unavailable- added by dspyz (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 18 Oct 2013 09:47:00 PM UTCdbatemanStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 18 Oct 2013 12:30:34 AM UTCdbatemanAttached File-=>Added patch.rowmax, #29397
      StatusNone=>Ready For Test
    Thu 17 Oct 2013 10:51:19 PM UTCdbatemanAssigned toNone=>dbateman

    Back to the top


    Powered by Savane 3.1-cleanup1