Mercurial > octave
changeset 33574:a2ea7c2222b8
oct-binmap.h: Remove FIXME notes after testing
oct-binmap.h: A couple of FIXME notes mentioned the idea of keeping track of
whether fcn call results in a 0, and potentially skipping maybe_compress()
if no new zeros are created. That idea was tested out for some 10 different
input combinations and found to make no performance difference: the time for
a binary operation between a scalar and a 1000x1000 matrix (in each order,
tested 1000 times each) changed by less than 3 microseconds, and sometimes
took that much *longer* than not keeping track of new zeros.
Statistically it made no difference, so the simpler code is preferred
and the FIXME notes have been removed.
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Sat, 11 May 2024 18:10:35 -0400 |
parents | c0d79d64a1b8 |
children | e894b4443965 273cf7c2302a |
files | liboctave/util/oct-binmap.h |
diffstat | 1 files changed, 0 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/util/oct-binmap.h Sat May 11 15:01:22 2024 -0400 +++ b/liboctave/util/oct-binmap.h Sat May 11 18:10:35 2024 -0400 @@ -236,8 +236,6 @@ for (octave_idx_type i = 0; i < nz; i++) { octave_quit (); - // FIXME: Could keep track of whether fcn call results in a 0. - // If no zeroes are created could skip maybe_compress() retval.xdata (i) = fcn (x, ys.data (i)); } @@ -267,8 +265,6 @@ for (octave_idx_type i = 0; i < nz; i++) { octave_quit (); - // FIXME: Could keep track of whether fcn call results in a 0. - // If no zeroes are created could skip maybe_compress() retval.xdata (i) = fcn (xs.data (i), y); }