惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
Tenable Blog
Project Zero
Project Zero
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
S
Schneier on Security
Scott Helme
Scott Helme
S
Securelist
Know Your Adversary
Know Your Adversary
Vercel News
Vercel News
IT之家
IT之家
V
V2EX
F
Fortinet All Blogs
Simon Willison's Weblog
Simon Willison's Weblog
K
Kaspersky official blog
博客园_首页
T
Tailwind CSS Blog
The GitHub Blog
The GitHub Blog
Spread Privacy
Spread Privacy
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
有赞技术团队
有赞技术团队
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
S
SegmentFault 最新的问题
AWS News Blog
AWS News Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost

GCC

请问如何将 GCC 编译成一个独立的可执行文件? - V2EX GDB 程序崩溃没有效代码堆栈该怎么调试?要被折磨疯了 - V2EX genssource 编译过不去啊 - V2EX 编译器是如何识别出 ++ 而不是两个加号的?是如何识别出前缀自增和后缀自增的? - V2EX 询问一个编译原理的问题: implicit declaration of function 'yyerror' is invalid in C99 - V2EX 哪位大神帮忙看一下代码有什么问题 - V2EX
影响Gcc编译速度的瓶颈在哪? - V2EX
obiwong · 2011-05-05 · via GCC
Jet

8

Jet      2011 年 5 月 6 日

@obiwong 堆内存和栈内存。
对于 C 的变量有两种分配方式,大概是除 malloc 以外部分都分到栈内存,而这部分优化空间最高,分析也就最慢。
补充一下,关于最短一块是CPU Cache,是因为编译过程需要很大的暂存空间,有很大的调度量。其实主要还是内存分配上,需要一些编程技巧来避免编译过程中需要过大的暂存(例如函数不要写得过长过大),基本上对编译是有「加速」作用。
另外忘了说,还有库的调用(.h)本身对于磁盘IO的考验也非常大,甚至是最大的,因为调用一个头文件,头文件里面估计又会包含无数个obj。这里本身已经不是在编译一个文件而是编译无数个文件然后 link 起来