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

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

[Octave-patch-tracker] [patch #10314] matlab compatible std, var, mean,


From: Nicholas Jankowski
Subject: [Octave-patch-tracker] [patch #10314] matlab compatible std, var, mean, median to core from statistics package
Date: Thu, 2 Mar 2023 11:31:41 -0500 (EST)

Follow-up Comment #3, patch #10314 (project octave):

Thanks for the cleanup. I really had thought I scrubbed them. (Even the 1 line
dim checks. I really thought I had done that but must have reverted/not
restored it somewhere along the way)

2 questions - 
1) is there a particular reason to permute the operating dimensions to the end
rather than the front? performance? preference?   in median (where i see you
left it at the front) it was done that way to ease the flattened omitnan
processing with sub2ind, etc., and that works much better for nD arrays when
you can count on the primary dimension being in 1 and whatever's left 
following. For the other functions i just followed suit. 

2) funny enough I had switched all the logical flags from t/f to 1/0 when
running tic/tocs and the profiler and saw that calls to true/false were
putting a ~3-5% penalty on runtime. I thought it would be the opposite, with a
conversion to logical happening inside ifs. It's hardly significant compared
to all the other input validation cruft, but had no idea why it would work
that way.  

any other streamlining advice on these welcome.  the extra input handling did
put a hit on performance and some of the codepaths, especially vecdim
handling, aren't exactly speedy. 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?10314>

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




reply via email to

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