Will there be performance and security improvements?

  • @lloram239@feddit.de
    link
    fedilink
    111 months ago

    you are comparing the libraries with each other.

    It’s not the libraries that make the difference, but that C++ templates allow you to write generic code that is easy to use and easy to optimized for the compiler due to having all the real data types readily available, while C has to fiddle with void* and function pointer to get similar flexibility, which are much harder to optimize, as none of the type information is there.

    • @Cpo@lemm.ee
      link
      fedilink
      011 months ago

      while C has to fiddle with void* and function pointer to get similar flexibility, which are much harder to optimize, as none of the type information is there.

      I thought we were discussing speed, not ease of use?

      • @lloram239@feddit.de
        link
        fedilink
        011 months ago

        If you manually hand optimize every line of code, C and C++ are identical. That’s a worthless discussion to have. The point is that you can write in C++ high level code that would require substantial code duplication to match the speed in C, as C just doesn’t offer the tools for that level of abstraction.

        • @Cpo@lemm.ee
          link
          fedilink
          011 months ago

          …so now we are discussing not speed again but ease of use.

          Not everything with an R in it is faster than C. Read up about it. Everyone says so.

          I’m out.