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

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

[Octave-bug-tracker] [bug #65244] Simplify code complexity of perms.cc


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #65244] Simplify code complexity of perms.cc
Date: Fri, 9 Feb 2024 12:29:11 -0500 (EST)

Follow-up Comment #16, bug#65244 (group octave):

The changeset adds the following comment:

+      // Mutual Comparison is used to detect duplicate values.
+      // Using sort would be possible for numerical values and be of 
+      // n log n complexity instead of n * (n / 2). But sort
+      // is not supported for the octave-value container (structs/cells). 
+      // As the perms element size n must be very small, any potential
+      // gains would be minimal as nearly all CPU is spent to create the 
+      // actual permutations.


I didn't compare the performance. But the argument looked reasonable to me. Is
that not the case?



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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