加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

为什么SQLite提供其代码的合并?

发布时间:2020-12-12 23:43:29 所属栏目:百科 来源:网络整理
导读:每次我下载SQLite时,我都会遇到这样一个事实,即他们提供了几个不同版本的源代码,这是我从未见过任何其他项目所做的事情.而且更多的是它们提供了源的合并,将所有文件合并为3个文件.这是什么原因?这只是编译速度吗?还是有一些非常好的理由呢?其他项目是否使
每次我下载SQLite时,我都会遇到这样一个事实,即他们提供了几个不同版本的源代码,这是我从未见过任何其他项目所做的事情.而且更多的是它们提供了源的合并,将所有文件合并为3个文件.这是什么原因?这只是编译速度吗?还是有一些非常好的理由呢?其他项目是否使用源代码合并? 直接在 page about amalgamation上说明

In addition to making SQLite easier to incorporate into other projects,the amalgamation also makes it run faster. Many compilers are able to do additional optimizations on code when it is contained with in a single translation unit such as it is in the amalgamation. We have measured performance improvements of between 5 and 10% when we use the amalgamation to compile SQLite rather than individual source files. The downside of this is that the additional optimizations often take the form of function inlining which tends to make the size of the resulting binary image larger.

我自己也看到了将其纳入其他项目的最大好处.它简单地使编译更容易.没有构建脚本混乱以及拥有大量源文件后的其他内容.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读