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

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

[Octave-bug-tracker] [bug #63962] perms - Performance - Usage of native


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #63962] perms - Performance - Usage of native C++ algorithm helpful
Date: Tue, 28 Mar 2023 09:21:31 -0400 (EDT)

Follow-up Comment #17, bug #63962 (project octave):

@Hendrik: Thanks for pulling in the BISTs from bug #63965.

Nearly there. I'm attaching a version for your review. I stripped some
trailing spaces from the ends of lines, capitalized whole-line comments, etc.
I also made the if-else ladder fit on one line where possible, shortening one
variable name (unique_v --> uniq_v) to make things fit.

I see that you're returning 0 for the case that the input class was not
recognized. I changed that to returning an empty octave_value with a warning
that the class was not recognized. Is that OK with you?

Btw, why are you setting do_sort to false for the case of booleans? There is a
comment that you're doing so consciously by design, but the reason isn't
clear. Leaving it true makes it more consistent with "reverse lexicographic
order", which the existing perms.m doesn't do properly for e.g. `perms ([false
false true])`. Is it OK to change it to true? If not, a longer comment would
be helpful.

Also, what is your preferred name and email for the commit log? Right now I
have "Hendrik K <koerhen@web.de>".


(file #54537)

    _______________________________________________________

Additional Item Attachment:

File name: perms_v3.patch                 Size:21 KB
    <https://file.savannah.gnu.org/file/perms_v3.patch?file_id=54537>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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