octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #36372] Improved ranks.m included:


From: Rik
Subject: [Octave-bug-tracker] [bug #36372] Improved ranks.m included:
Date: Thu, 15 Nov 2018 14:46:44 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063

Update of bug #36372 (project octave):

                  Status:         Patch Submitted => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #34:

@Dave: I apologize for this taking so long.  Even for Octave, 6 years is a bit
much.  This bug report just slipped through the cracks.  I updated the lastest
version of the patch to apply cleanly to the current development branch.  I
also changed some of the code to follow Octave coding conventions.  You have
been added to the list of contributors to Octave which shows up at the front
of the manual.  I also announced the changes to ranks in the NEWS file
(updated with every release) because I think this is an important development.
 I checked everything in here
https://hg.savannah.gnu.org/hgweb/octave/rev/31b443b5a6c1.

I put two FIXME notes in the code.  Note #1 is


    ## The algorithm works only on dim = 1, so permute if necessary.
    ## FIXME: Most all functions now accept a dim argument.
    ##        Would it be faster not to permute and use the dim argument
    ##        to sort, find, cumsum, etc.?


The second note is


    ## Offsets to map indices into each column to indices into the linear
array.
    ## FIXME: Would sub2ind be faster here?
    idf = zeros (sz);
    idf(1, :) = 0 : sz(1) : (numel (ids)-1);
    idf(:, :) = repmat (idf(1, :), [sz(1), ones(1,length(sz)-1)]);
    y(ids + idf) = lin;


The 25X improvement on my machine is really wonderful, but perhaps there is
still more that can be done.

Marking bug as fixed and closing report.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?36372>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]