• frezik
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    16 hours ago

    It’s slightly less close to the metal as C. Array bounds checks are always going to cost you something, for example. However, if you look at the speed of numeric computation in C, Rust, and Go, they’re all in the same order of magnitude performance compared to things like Python or JavaScript (not including things like PyPi, which is C with extra steps).

    • Juice
      link
      fedilink
      arrow-up
      2
      ·
      15 hours ago

      Wow thanks so much for breaking that down for me! The discussions I’ve been having here and the information devs are sharing is really kicking me off the fence about learning Rust

      • frezik
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        15 hours ago

        Eh, I’d still go for it. I find the Rust compiler tends to amplify my impostor syndrome–it tells you all the ways you are objectively being stupid. I know that’s not really selling it, but it’s doing that stuff for a reason. I’m especially hopeful that it becomes the standard way to do things with microcontrollers; that’s about the only place I write C/C++ at all.