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

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

[Octave-bug-tracker] [bug #60928] Performance of sort unexpectedly slow


From: anonymous
Subject: [Octave-bug-tracker] [bug #60928] Performance of sort unexpectedly slow for DIM=2
Date: Mon, 16 Aug 2021 20:32:03 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Follow-up Comment #20, bug #60928 (project octave):

I searched for "offset2" through the Octave code base on the assumption that
the same pattern might use the same variable name. I found this in
libinterp/corefcn/filter.cc:


    123           octave_idx_type x_offset2 = 0;
    124           x_offset = num;
    125           while (x_offset >= x_stride)
    126             {
    127               x_offset -= x_stride;
    128               x_offset2++;
    129             }
    130           x_offset += x_offset2 * x_stride * x_len;
    131         }
    132       octave_idx_type si_offset = num * si_len;


It might not be a performance bottleneck but if it doesn't break anything it
might be worth replacing with the same division expression, at your
discretion.

Thanks again for this analysis with sort() and the patch.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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