1587 / 1587.github.com

0 stars 0 forks source link

sqlite把所有文件合并到一个c文件里面,性能提高5%-10% #249

Open 1587 opened 6 years ago

1587 commented 6 years ago

https://www.sqlite.org/amalgamation.html

  1. Executive Summary

Over 100 separate source files are concatenated into a single large files of C-code named "sqlite3.c" and called "the amalgamation". The amalgamation contains everything an application needs to embed SQLite. The amalgamation file is more than 180,000 lines long and over 6 megabytes in size.

Combining all the code for SQLite into one big file makes SQLite easier to deploy — there is just one file to keep track of. And because all code is in a single translation unit, compilers can do better inter-procedure optimization resulting in machine code that is between 5% and 10% faster.