[STL] Comment about STL libraries performance
1 unresolved thread
1 unresolved thread
Merge request reports
Activity
added Documentation Jupyter labels
added 1 commit
- 7125aaf6 - Reword a bit the new paragraph about STL and performance.
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", It is also important also
- you should remove one also.loop unrolling
could provide a link to https://en.wikipedia.org/wiki/Loop_unrolling (or something more relevant maybe).Good catch, thanks!
I will also add the link, unless @vicente.mataix gets a better one (in which case feel free to change it directly)
Edited by GILLES Sebastienchanged this line in version 3 of the diff
Please register or sign in to reply