bugGNU Octave - Bugs: bug #30787, Table lookup performance is really...

 
 

bug #30787: Table lookup performance is really slow

Submitted by:  None
Submitted on:  Mon 16 Aug 2010 11:01:26 AM UTC  
 
Category: InterpreterSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: NoneAssigned to: Jaroslav Hajek <highegg>
Originator Name: Ondrej SuchOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.2
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 16 Aug 2010 12:23:15 PM UTC, comment #1:

There is no newtable() builtin in Octave; besides, I think you guess wrong where the problem is. A couple of simple measurements suggest that the function to blame is addtotable(), which is designed to take advantage of Matlab's matching input/output argument optimization. Octave doesn't have that optimization, that's why the performance sucks.

Since Octave 3.3.51+ can do the trick for classes, a nice solution would be to turn the hashtable into a class, and turn on optimize_subsasgn_calls. Another option is to use a global variable. I've had some ideas how to proceed to implement the optimization in question for Octave; but right now I lack the incentive to do so.

Jaroslav Hajek <highegg>In charge of this item.
Mon 16 Aug 2010 11:01:26 AM UTC, original submission:

Try out commands

problem1 = readmps("afiro.mps");
problem2 = readmps("80bau3b.mps");

The former one is very slow, and the latter does not even complete in any reasonable amount of time.

The MPS files are standard ones from a NETLIB collection, and the author of readmps says his code runs fine in Matlab (code downloaded from http://infohost.nmt.edu/~borchers/readmps.html).

The slowness of the code appears to be caused by linear time lookups in coltable created by calling newtable() Octave built-in function.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21234:  readmps.zip added by None (8KiB - application/octet-stream)
file #21235:  afiro.mps added by None (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by highegg (Posted a comment)
  • -unavailable- added by None (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 24 Aug 2010 10:28:13 AM UTChigheggAssigned toNone=>highegg
      Open/ClosedOpen=>Closed
    Mon 16 Aug 2010 12:23:15 PM UTChigheggCategoryNone=>Interpreter
      Severity3 - Normal=>1 - Wish
      Item GroupNone=>Feature Request
    Mon 16 Aug 2010 11:01:27 AM UTCNoneAttached File-=>Added readmps.zip, #21234
      Attached File-=>Added afiro.mps, #21235

    Back to the top


    Powered by Savane 3.1-cleanup1