[bug #68300] blkdiag with arguments of type single returns result of type double
"Dmitri A. Sergatskov" <[email protected]> Mon, 4 May 2026 09:09:04 -0400 (EDT)
| 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 #11, bug #68300 (group octave):
`isa()` probably wins with large arrays, but may be it is a wrong use case to
optimize too.
octave:30> a = ones(5000, "uint8");
octave:31> b = double(a);
octave:32> tic; for jj=1:100 ; x = isa(b,"double"); endfor; toc
Elapsed time is 0.000447035 seconds.
octave:33> tic; for jj=1:100 ; x = isa(a,"double"); endfor; toc
Elapsed time is 0.00031209 seconds.
octave:34> tic; for jj=1:100 ; b = double(a); endfor; toc
Elapsed time is 2.73394 seconds.
Dmitri.
--
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68300>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCafiacAAKCRCqLAuaBUf3 ThBrAP0Qes2nKSGYnRSOWWYBwZPV60fc6x/zottE0GHGsdav7QEA+SucyIJIMRuZ MgYu1GN4JMIxVdL5+dHi/nuZ4GjyVA4= =c581 -----END PGP SIGNATURE-----