+ 1

Will using many libraries in C++ cause decline the speed or the memory ?

21st Sep 2019, 3:38 PM
𝓐 𝓢 𝓐 𝓓 𝓑 𝓔 𝓚
𝓐 𝓢 𝓐 𝓓 𝓑 𝓔 𝓚 - avatar
2 ответов
+ 3
The more headers you include, the more code the compiler has to analyze, meaning the compile time will increase (although there are again differences when it comes to how you link to libraries). However, runtime speed and memory are only dependant on what happens inside your program, so they are unaffected by how many headers you include. Note that most modern compilers can also optimize out any unused code from headers you include, so that the executable file you get from compiling your program becomes smaller and more efficient.
21st Sep 2019, 4:02 PM
Shadow
Shadow - avatar
0
Thank you Shadow
22nd Sep 2019, 5:19 AM
𝓐 𝓢 𝓐 𝓓 𝓑 𝓔 𝓚
𝓐 𝓢 𝓐 𝓓 𝓑 𝓔 𝓚 - avatar