Mentions légales du service

Skip to content
Snippets Groups Projects

[STL] Comment about STL libraries performance

Merged Vicente Mataix Ferrándiz requested to merge stl/comment-about-stl-lib-performance into master
1 unresolved thread

Merge request reports

Approval is optional

Merged by GILLES SebastienGILLES Sebastien 4 years ago (May 10, 2021 4:31pm UTC)

Merge details

  • Changes merged into master with b4ba3bd7.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
539 539 "\n",
540 540 "The reading of \\cite{Cukic2018} should provide more incentive to use them.\n",
541 541 "\n",
542 "On top of this, C++ 20 introduce a completely new way to deal with algorithms, which does not rely on direct use of iterators but instead on a range library. This leads to a syntax which is more akin to what is done in other languages - see for instance this example lifted from this [blog post](https://www.modernescpp.com/index.php/c-20-the-ranges-library):\n"
542 "It is also important also to highlight that while the STL algorithms may provide you efficiency (this library is written by highly skilled engineers after all), this is not its main draw: the algorithms are written to be as generic as possible. The primary reason to use them is to allow you to think at a higher level of abstraction, not to get the fastest possible implementation. So if your ~~intuition~~ benchmarking has shown that the standard library is causing a critical slowdown, you are free to explore classic alternatives such as loop unrolling - that's one of the strength of the language (and the STL itself opens up this possibility directly for some of its construct - you may for instance use your own memory allocator when defining a container). For most purposes however that will not be necessary.\n",
  • added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading