Small. Fast. Reliable.
Choose any three.

About Sitemap Documentation Download License News Support |

## Size Of The SQLite Library

The code space used by the SQLite library depends heavily on the target platform, what compiler and optimization options are used to generate object code, and which optional features of SQLite are included or omitted from the build. This page provides examples of what to expect.

SQLite version 3.7.8 is less than 350KiB in size on x86 with -Os and less than 400KiB (409KB) on x64. The -O2 and -O3 builds are larger, presumably due to loop unrolling and function inlining.

### Case 1

- SuSE Linux 10.1
- GCC 4.1.0
- SQLite version 3.7.8
- x86 (32-bit)

Optimization Setting | Size (bytes) | Run-time (Relative to -O0)
--- | --- | ---
-O0 | 529765 | 1.00
-O1 | 397204 | 0.71
-Os | 333059 | 0.73
-O2 | 418161 | 0.68
-O3 | 828602 | 0.66

### Case 2

- Ubuntu
- GCC 4.5.2
- SQLite version 3.7.8
- x86_64 (64-bit)

Optimization Setting | Size (bytes) | Run-time (Relative to -O0)
--- | --- | ---
-O0 | 625841 | 1.00
-O1 | 455072 | 0.62
-Os | 404201 | 0.59
-O2 | 499543 | 0.53
-O3 | 678465 | 0.54

### Case 3

- Mac OS 10.7.1 (Lion)
- GCC 4.2.1 + LLVM
- SQLite version 3.7.8
- x86_64 (64-bit)

Optimization Setting | Size (bytes) | Run-time (Relative to -O0)
--- | --- | ---
-O0 | 806598 | 1.00
-O1 | 508500 | 0.61
-Os | 481816 | 0.57
-O2 | 614346 | 0.55
-O3 | 661622 | 0.55