Re:Size isn't everything for the modest creator of SQLite (2...
by dalke on Friday February 05, 2016 @07:46PM
(#11045889)
A nice interview, though from 2007. One thing has changed a smidgeon: "he has a self-imposed limit on the size of his product: 250KB. And he's stuck to both aims". The FAQ on sqlite.org says "With all features enabled, the library size can be less than 500KiB ... If optional features are omitted, the size of the SQLite library can be reduced below 300KiB." Close though!
[ Parent
| on HN ]
Re:Size isn't everything for the modest creator of SQLite (2...
by nly on Friday February 05, 2016 @08:05PM
(#11045956)
Also out of date. The 3.10.2 shared library is over 1 MiB on my system.
Re:Size isn't everything for the modest creator of SQLite (2...
by dalke on Friday February 05, 2016 @10:19PM
(#11046386)
Compiling with -Os brings it down to 800 KB.
% gcc -c sqlite3.c
% ls -l sqlite3.o
-rw-r--r-- 1 dalke admin 1270372 Feb 6 04:11 sqlite3.o
% gcc -c sqlite3.c -Os
% ls -l sqlite3.o
-rw-r--r-- 1 dalke admin 805044 Feb 6 04:12 sqlite3.o
% clang -c sqlite3.c
% ls -l sqlite3.o
-rw-r--r-- 1 dalke admin 1248704 Feb 6 04:15 sqlite3.o
% clang -c -Os sqlite3.c
% ls -l sqlite3.o
-rw-r--r-- 1 dalke admin 796888 Feb 6 04:16 sqlite3.o
778 KiB is still some 50% larger than 500.
Re:Size isn't everything for the modest creator of SQLite (2...
by SQLite on Friday February 05, 2016 @10:50PM
(#11046467)
Using "gcc -Os -m32 -c sqlite3.c; size sqlite3.o" I get 443,264 bytes using the latest SQLite source on Ubuntu.
The "size" command gives a more accurate measurement of what actually ends up in a compiled and stripped binary. "ls -l" includes symbolic and linking info that gets stripped from the finished binary.
Re:Size isn't everything for the modest creator of SQLite (2...
by obelisk_ on Sunday February 07, 2016 @04:49AM
(#11052343)
Are you the author of SQLite or did you just name your account so for other reasons?
Re:Size isn't everything for the modest creator of SQLite (2...
by lorenzhs on Sunday February 07, 2016 @05:40AM
(#11052446)
From their comment history it seems like the GP really is SQLite's author, Richard Hipp. Cool!
Re:Size isn't everything for the modest creator of SQLite (2...
by SQLite on Sunday February 07, 2016 @06:10AM
(#11052516)
Yes, I am.
Re:Size isn't everything for the modest creator of SQLite (2...
by orvr on Sunday February 07, 2016 @07:01AM
(#11052590)
May I ask you about the current state of sqlite4?
Re:Size isn't everything for the modest creator of SQLite (2...
by dalke on Friday February 05, 2016 @11:35PM
(#11046567)
Thanks for the pointer to 'size'. I so rarely compile code these days. FWIW, on my Mac with 3100200, clang -Os -m32 is 495,508 bytes while gcc is 507,378.
Re:Size isn't everything for the modest creator of SQLite (2...
by jevinskie on Sunday February 07, 2016 @03:30AM
(#11052180)
Clang also has -Oz for even more aggressive size optimizations. I find that it is identical codegen to -Os half the time and shows some nice size reductions the other half of the time.