Skip to content

Commit

Permalink
building with LispWorks tree shaker: 8MB hello-world binary.
Browse files Browse the repository at this point in the history
  • Loading branch information
vindarel committed Jan 11, 2024
1 parent 8ba95cc commit 82aeeb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ an optional return code, instead of `sb-ext:quit`).

### Size and startup times of executables per implementation

SBCL isn't the only Lisp implementation.
[ECL](https://gitlab.com/embeddable-common-lisp/ecl/), Embeddable
**SBCL** isn't the only Lisp implementation.
[**ECL**](https://gitlab.com/embeddable-common-lisp/ecl/), Embeddable
Common Lisp, transpiles Lisp programs to C. That creates a smaller
executable.

Expand All @@ -379,11 +379,15 @@ CCL's binaries seem to be as fast to start up as SBCL and nearly half the size.
| 19948 | clisp.big | 97% | .0259 |
```

You'll also want to investigate the proprietary Lisps' tree shakers capabilities.
<!-- TODO: what about SBCL with maximum core compression? -->

Regarding compilation times, CCL is famous for being fast in that regards.
Regarding compilation times, **CCL** is famous for being fast in that regards.
ECL is more involved and takes the longer to compile of these three implementations.

You'll also want to investigate the proprietary Lisps' **tree shakers** capabilities.
**LispWorks** can build a 8MB hello-world program, without compression but fully tree-shaken.
Such an executable is generated in about 1 second and the runtime is inferior to 0.02 seconds on an Apple M2 Pro CPU.


### Building a smaller binary with SBCL's core compression

Expand Down
2 changes: 1 addition & 1 deletion web.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Example:
(format nil "Hey~@[ ~A~]!" name))
~~~

Visit it at [p://localhost:4242/yo](http://localhost:4242/yo) and add parameters on the url:
Visit it at [http://localhost:4242/yo](http://localhost:4242/yo) and add parameters on the url:
[http://localhost:4242/yo?name=Alice](http://localhost:4242/yo?name=Alice).

Just a thought… we didn't explicitly ask Hunchentoot to add this
Expand Down

0 comments on commit 82aeeb0

Please sign in to comment.