[bug #68121] convert isequal to built-in function for performance
Moeness Belgacem <[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 #7, bug #68121 (group octave):
Hi Andy,
Thank you for the code review!
You were absolutely right to question the logic. After careful testing,
I confirm the original && condition is correct:
if (! same_class && ! numeric_compat)
return false;
This properly allows cross-type numeric comparisons (e.g., double vs
int32) while rejecting incompatible combinations. My apologies for the
confusion in the previous version.
The attached patch (v2) keeps the correct && logic and includes all
previous improvements:
- C++ built-in implementation for performance
- Full support: numeric, complex, sparse, char, struct, cell
- Proper NaN handling (isequal vs isequaln)
- Verified: int32/double comparisons work correctly
Thanks again for catching this!
Best regards,
Moeness
(file #58423)
_______________________________________________________
Additional Item Attachment:
Name: isequal-builtin-final.patch Size: 14kio
<https://file.savannah.gnu.org/file/isequal-builtin-final.patch?file_id=58423>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-f290f6b25beb8cb99bbe243a6cd2c5fef79ffcde.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68121>
_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCacvqzgAKCRCqLAuaBUf3 Tl+JAQDXzAFW1cNRbKF5+LRM2pX4lHxnFLBKAizHcuZYlNlwDwEAg02Yn9sMybm5 fjP6X0PexnLUaNr62BApCE0OZClS3gQ= =hxhX -----END PGP SIGNATURE-----