On Friday, 24 April 2026 at 21:00:52 UTC, Meta wrote:
The arguments from that section are:
- 32-bit integer operations are often faster than smaller integer types for single variables on modern architectures.

I'm not an expert in modern CPU architecture, but I'm extremely skeptical of this claim. I doubt the difference is even noticeable with modern compiler optimization techniques.

Even without optimization: nothing prevents the compiler from calculating in the machine-words size, but the result should be truncated to the the largest of the operands sizes.

What if you want to port the C code to D so you can refactor and develop it using D features?

Then you should take the (more sane) rules of D into account.
I think if you plan to develop the code further, you should be well aware of where strange C edge-cases are used and fix this.
  • Operator declara... Dom Disc via Digitalmars-d-learn
    • Re: Operato... H. S. Teoh via Digitalmars-d-learn
    • Re: Operato... Dom Disc via Digitalmars-d-learn
    • Re: Operato... Meta via Digitalmars-d-learn
      • Re: Ope... Dom Disc via Digitalmars-d-learn
      • Re: Ope... Nick Treleaven via Digitalmars-d-learn
        • Re:... Meta via Digitalmars-d-learn
          • ... Dom Disc via Digitalmars-d-learn
          • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... Nick Treleaven via Digitalmars-d-learn
            • ... Meta via Digitalmars-d-learn
              • ... Nick Treleaven via Digitalmars-d-learn
                • ... Dom Disc via Digitalmars-d-learn
                • ... Andy Valencia via Digitalmars-d-learn
                • ... Nick Treleaven via Digitalmars-d-learn
                • ... Dom Disc via Digitalmars-d-learn
                • ... Nick Treleaven via Digitalmars-d-learn
    • Re: Operato... Dom Disc via Digitalmars-d-learn

Reply via email to