No. The size of the object code depends on what compiler optimizations are used. Generally speaking, there is a tradeoff between size and performance. The more memory you devote to a program the faster it will run.
The following table shows the object-code size of a pre-3.3.14 version of SQLite versus the run-time for the "speed1.test" performance test in the source tree.
GCC Options Size (KiB) Size (relative) Runtime (relative) none 362 1.62 1.17 -O0 407 1.82 1.72 -O1 293 1.31 1.15 -Os 224 1.00 1.19 -O2 306 1.37 1.09 -O3 513 2.29 1.00
So, Yes, SQLite really does weight in at less than 250KiB when compiled with -Os. But if you want to add that extra 20% performance boost of -O3, you'll need to allow the library to more than double in size.
Test Information
The above tests were run on a SuSE 10.1 system with GCC 4.1.0 using the amalgamation source file "sqlite3.c". The "-fomit-frame-pointer" option was used in every cases except the first "none" case. Other compile-time options where:
- -DHAVE_FDATASYNC=1
- -DHAVE_GMTIME_R=1
- -DHAVE_LOCALTIME_R=1
- -DHAVE_USLEEP=1
- -DSQLITE_ENABLE_REDEF_IO=1
Other Compilers
Readers are invited to run similar size versus speed studies on other compilers and operating systems and report their findings below