[bug #68121] convert isequal to built-in function for performance
Andy Potvin <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.bugs |
|---|---|
| Message-ID | <[email protected]> |
Please use the bug tracker to post updates to a bug report. The mailing list is intended as a read-only notification stream. Info posted to this mailing list address won't appear in the tracker database where it is most useful.
Follow-up Comment #19, bug #68121 (group octave):
Just curious if within do_isequal_nargs and do_isequal you might test that the
user literally input the same variable; i.e. the trivial case.
% Previously defined any variable, V.
boo = isequaln(V,V);
I.e. within do_isequal, after defining default err
// Trivial case of inputting same variable. Quick true.
if ( nan_equal && (&x == &y) )
return true;
And within do_isequal_nargs, after defining y
// Trivial case of inputting same variable. Quick true.
if ( !nan_equal || (&x != &y) )
{
// Insert rest of code.
}
// Implicit else-clause ( nan_equal && (&x == &y) ) is a no-op.
I'm not sure if there's a quick exit potential for when !nan_equal; I'm
guessing an octave_value object does not have boolean member dedicated to
whether there's a NaN anywhere in the object.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68121>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCacz3vgAKCRCqLAuaBUf3 TmApAP9MvNbGiDixysOf1P/bnCl5A0eArKVxRoDt+jsju3ZsrAD+IaYHzEXMhtEv h23VFtZ0SGmuSC8Gyz0HccAOT4xiCgA= =JMek -----END PGP SIGNATURE-----