[OT] The Usual Arithmetic Confusions
Siarhei Siamashka
siarhei.siamashka at gmail.com
Sat Feb 5 03:08:15 UTC 2022
On Saturday, 5 February 2022 at 02:43:27 UTC, Walter Bright wrote:
> P.S. as a pragmatic programmer, I find very little use for
> shorts other than saving some space in a data structure. Using
> shorts as temporaries is a code smell.
As a pragmatic programmer with hand-coded assembly optimizations
experience and also familiar with SIMD compiler intrinsics, using
shorts as temporaries in C code actually works great for
prototyping/testing the behavior of a single 16-bit lane. As a
bonus, autovectorizers in compilers may pick up something too.
But tons of forced type casts is the actual code smell.
More information about the Digitalmars-d
mailing list