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

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

[Octave-bug-tracker] [bug #50426] perms() sort order different than Matl


From: Rik
Subject: [Octave-bug-tracker] [bug #50426] perms() sort order different than Matlab
Date: Thu, 2 Mar 2017 15:26:35 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #10, bug #50426 (project octave):

I benchmarked the old and new perms functions.  The new function is slightly
faster, about 16% improvement at N = 10.

bm_perms.m code


N = 50;

bm = zeros (N, 1);
x = zeros (3628800, 10); 

for i = 1:N
  tic;
#  x = perms (1:10);
  x = perms_new (1:10);
  bm(i) = toc;
endfor


Results
perms : median = .189
perms_new : median = .157
-16.9% improvement

If I switch to using 'uint8' then the median is .187 which basically erases
any savings.

So, I think this just needs to be updated to follow Octave coding
conventions.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50426>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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