4 ms·
50MB for Hello World
- pbohun 4y agoIt would be interesting to have an option like :bare-exe for save-lisp-and-die that would write only the compiled code and garbage collector. One could probably get to around 1MB then.
- zachbeane 4y agoIf you mean the C compiled code, that's what a typical sbcl binary is already. On my system it's around 2.5MB. The compiled CL code image (and its related data) is around 50MB. save-lisp-and-die sticks the image into the runtime binary.
- lispm 4y agoThere are a bunch of other options explored in Common Lisp: * saving a compressed image (SBCL) * saving a space optimized executable, using a tree shaker (Allegro CL, LispWorks), the delivery tool removes unused code, documentation, debug info, etc. Executables start at around 7MB on some platforms. * compiling to C, without using an image (ECL) * compiling to byte codes (ECL, CLISP) * whole program to C compilation of a static subset of Common Lisp (clicc, mocl, thinlisp) - this generates the smallest binaries
- kazinator 4y agoOn 32 bit x86 Ubuntu 18 (no, you can't get it, except by upgrading 16), TXR Lisp's VM footprint stays under 18 megabytes peak, when recompiling the compiler (a tad beyond hello world). If you recompile with CONFIG_SMALL_MEM, it stays under 12 megabytes. Half that fooprint includes things like the glibc mapping. https://news.ycombinator.com/item?id=31588057 https://news.ycombinator.com/item?id=31588057