• jdr@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    12 hours ago

    Citation needed! Processors have had multiplication in silicon since forever, and compiler writers aren’t stupid. You can even check on https://godbolt.org/ with old versions. I bet you can’t find a compiler from 1999 that won’t optimize an unsigned integer multiply to a bit shift without turning off optimisations.

    • zr0@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      12 hours ago

      C existed for almost a decade, before they added this specific optimization to compilers in late 1970

      I was not referencing particularly RCT and was just trying to explain, what optimizations mean on that level, be it automatic or manual.