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

 
 

bug #30787: Table lookup performance is really slow

Submitter:  None
Submitted:  Mon 16 Aug 2010 11:01:26 AM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  highegg
Originator Name:  Ondrej Such Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.2.2
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
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 Files:
   
   
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
  • -email is unavailable- added by highegg (Posted a comment)
  • -email is unavailable- added by None (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 group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-24 highegg Assigned toNone highegg
        Open/ClosedOpen Closed
    2010-08-16 highegg CategoryNone Interpreter
        Severity3 - Normal 1 - Wish
        Item GroupNone Feature Request
    2010-08-16 None Attached File- Added readmps.zip, #21234
        Attached File- Added afiro.mps, #21235

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code