Effective optimization strategies on modern C++ compilers

后端 未结 19 2082
梦如初夏
梦如初夏 2020-12-22 17:02

I\'m working on scientific code that is very performance-critical. An initial version of the code has been written and tested, and now, with profiler in hand, it\'s time to

19条回答
  •  青春惊慌失措
    2020-12-22 17:43

    And I think the main hint anyone could give you is: measure, measure, measure. That and improving your algorithms.
    The way you use certain language features, the compiler version, std lib implementation, platform, machine - all ply their role in performance and you haven't mentioned many of those and no one of us ever had your exact setup.

    Regarding replacing std::vector: use a drop-in replacement (e.g., this one) and just try it out.

提交回复
热议问题