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 14:40:35 -0500 (EST)

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

2) since we can't get the details from the parser on the penalty from if(flag)
(that all gets lumped into the functions 'self' time i think), i saw
explicitly the time used for calling false, which should be from the
flag=false lines. I didn't explicitly check to see if the time reduction was
on the same order or not, as it was small enough it may have been tough to
tease out over normal variability.  but it was enough that I kept it in. For
now I guess we cough it up to m-code function calling overhead. small enough
though that code readability taking precedence makes sense.

(it also never occurred to me that all class names are functions and feval was
much cleaner)

in median the issue wasn't so much in calling sum for dimensions other than 1,
it was trying to vectorize selecting different pair of numbers to sum in each
column. I didn't see a way to do that with sub2ind with an unknown number of
dimensions unless my working direction was dim1 and i could flatten reference
all following dimensions with :, making it work for any number of dimensions. 
I'm not a huge fan of that flattening though, as noted in the FIXME we could
accidentally run into octave_index_type limits for high dimensionality data.


    _______________________________________________________

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]