08-13-2025 02:17 PM
@altenbach wrote:
@Yamaeda wrote:
If you add a U8 to a I32, to you explicitly convert the U8 first? 😉 I mean, the code is more correct, but the extra blocks makes it a little harder to read, since i always think "why are they doing this explicit conversion?".In addition, an explicit conversion is sometimes more expensive. (Example, but you would think the compiler should create identical code. I have not tested in recent version)
Debug still turned on? My impression was that the explicit conversion was making more places that could be probed, etc. With debugging off, I would expect identical code.
08-13-2025 02:40 PM
@crossrulz wrote:
With debugging off, I would expect identical code.
In principle, there is still an extra memory allocation of the lower DBL array while the multiplication might know how to multiply an integer with a DBL directly. No time for extensive tests at the moment ....
08-19-2025 09:08 AM
@altenbach wrote:
@Yamaeda wrote:
If you add a U8 to a I32, to you explicitly convert the U8 first? 😉 I mean, the code is more correct, but the extra blocks makes it a little harder to read, since i always think "why are they doing this explicit conversion?".In addition, an explicit conversion is sometimes more expensive. (Example, but you would think the compiler should create identical code. I have not tested in recent version)
Yeah i remember that little nugget. I assume it allocates a new array or something. Maybe Bool to number should have configurable output like the Multiply has?
08-19-2025 09:29 AM
08-22-2025 10:10 AM
@altenbach wrote:
@Yamaeda wrote:
Maybe Bool to number should have configurable output like the Multiply has?exactly 😄
It was only suggested in 2009, give'em some time! 😉