• words_number@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    10 months ago

    Yes, that optimization is finally enabled now. But even without it, programmers are less defensive when writing rust because of the freedom of UB, so they write more optimal code and use better architectures before the compiler even comes into play. It doesn’t show in micro benchmarks, but in more complex software that has been written in rust from the start it’s pretty obvious.

    • anlumo@feddit.de
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      I think that the excessive use of iterators is the reason for the more performant code. They allow for very good optimizations due to their compile time predictability.