我可以列出一个很好的常用 C++ 优化实践列表吗?
Can I have a great list of common C++ optimization practices?
我所说的优化是指您必须修改源代码才能更快地运行程序,而不是更改编译器设置.
What I mean by optimization is that you have to modify the source code to be able to run a program faster, not changing the compiler settings.
编写更好程序的两种方法:
Two ways to write better programs:
充分利用语言
配置您的应用程序
没有多少特定于语言的优化可以做 - 它仅限于使用语言结构(从 #1 中学习).主要好处来自上面的#2.
There is not much language specific optimization one can do - it is limited to using language constructs (learn from #1). The main benefit comes from #2 above.
这篇关于常用 C++ 优化技术列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
fpermissive 标志有什么作用?What does the fpermissive flag do?(fpermissive 标志有什么作用?)
如何在我不想编辑的第 3 方代码中禁用来自 gccHow do you disable the unused variable warnings coming out of gcc in 3rd party code I do not wish to edit?(如何在我不想编辑的第 3 方代码中禁
使用 GCC 预编译头文件Precompiled headers with GCC(使用 GCC 预编译头文件)
如何在 OS X 中包含 omp.h?How to include omp.h in OS X?(如何在 OS X 中包含 omp.h?)
如何让 GCC 将 .text 部分编译为可写在 ELF 二进制文How can I make GCC compile the .text section as writable in an ELF binary?(如何让 GCC 将 .text 部分编译为可写在 ELF 二进制文件中?)
GCC、字符串化和内联 GLSL?GCC, stringification, and inline GLSL?(GCC、字符串化和内联 GLSL?)