Will there be performance and security improvements?

  • Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    arrow-up
    27
    arrow-down
    2
    ·
    1 year ago

    The use of basic classes can very quickly become a performance issue because of data locality issues, confusing the branch predictor, and generally using instructions where C wouldn’t need to.

    They’re honestly insignificant compared to the value you get in return, especially with the better typing and application design, but they’re there.

    If you stick to the builtin classes, no capturing lambdas, don’t use too many generics, and use const often enough, you should be able to produce code that’s as fast as C. At that point you may as well use C, though, especially because one mistake with semantics and you’re back to hitting C++ related performance issues anyway.