gpt4 book ai didi

c - 将所有 C 代码写在一个源文件中真的会使程序运行得更快吗?

转载 作者:太空狗 更新时间:2023-10-29 16:10:03 25 4
gpt4 key购买 nike

<分区>

我刚刚注意到在 sqlite 3 源代码文件的开头,它说:

/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
** version 3.27.1. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a single translation
** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements
** of 5% or more are commonly seen when SQLite is compiled as a single
** translation unit.

我以前不知道这个,也找不到权威的来源来支持它。这是真的? C++ 呢?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com