- Expert C++
- Vardan Grigoryan Shunguang Wu
- 94字
- 2021-06-24 16:33:54
Optimization
Generating intermediate code helps the compiler to make optimizations in the code. Compilers try to optimize code a lot. Optimizations are done in more than one pass. For example, take the following code:
int a = 41;
int b = a + 1;
This will be optimized into this during compilation:
int a = 41;
int b = 41 + 1;
This again will be optimized into the following:
int a = 41;
int b = 42;
Some programmers have no doubt that, nowadays, compilers code better than programmers.
推薦閱讀
- Unreal Engine Physics Essentials
- Learning Cython Programming
- 機(jī)器學(xué)習(xí)系統(tǒng):設(shè)計(jì)和實(shí)現(xiàn)
- Drupal 8 Blueprints
- 算法訓(xùn)練營:入門篇(全彩版)
- Learning Python Design Patterns(Second Edition)
- Android 應(yīng)用案例開發(fā)大全(第3版)
- C#程序設(shè)計(jì)
- WebRTC技術(shù)詳解:從0到1構(gòu)建多人視頻會議系統(tǒng)
- Mastering JBoss Enterprise Application Platform 7
- Learning Laravel's Eloquent
- Android應(yīng)用案例開發(fā)大全(第二版)
- Access 2010中文版項(xiàng)目教程
- SQL Server 2008 R2數(shù)據(jù)庫技術(shù)及應(yīng)用(第3版)
- SQL Server 入門很輕松(微課超值版)