• qaz@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      4 days ago

      Rust is better for writing multithreaded applications which means that the small amount of utilities that can utilize parallelism receive a significant speedup. uutils multithreaded sort was apparently 6x faster than the GNU utils single threaded version.

      P.S. I strongly doubt handwritten assembly is more efficient than modern C compilers.

      • jecxjo@midwest.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 days ago

        P.S. I strongly doubt handwritten assembly is more efficient than modern C compilers.

        As with everything, it all depends.

        When writing super efficient assembly you write towards the destination and not necessarily to fit higher level language constructs. There are often ways to cut corners for aspects not needed, reduction in instructions and loops all based on well designed assembly.

        The problem is you aren’t going to do that for every single CPU instruction because it would take forever and not provide a good ROI. It is far more common to write 99% of your system code in C and then write just the parts that can really benefit from fine tuned assembly. And please note that unless you’re writing for an RTOS or something crazy critical on efficiency, its going to be even less assembly.