• trevor (he/they)@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 day ago

    Unless you’re talking about some sort of reference counting, which has to be explicitly added by the programmer in cases where doing so is required for memory safety, I’m not sure what runtime checks you’re referring to?

    From what I’ve seen, the performance of programs written in C and Rust are generally the same, more or less, with C or Rust coming out on top with roughly coinflip odds in a handful of cases. This feels like the primary differentiator in performance really comes down to the implementation of the person writing it, and less to do with any performance differences inherent to either language.

    • PlexSheep@infosec.pub
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      22 hours ago

      I found the study: https://doi.org/10.1145/3551349.3559494

      It’s open access, short, and really well written. Was a primary source of my bachelor’s thesis.

      Figure 2 for the lazy people:

      The results of this study suggest that rust programs can be a bit slower, or nearly match the performance of C programs on x86-64, and that the runtime checks play a big role in this dynamic.