Experimental Clojure compiler with small memory footprint, fast loading time and reduced binary size.Show me the numbers!
skʊmut, from Norwegian: skummet — skimmed, fat-free) is a tool that
compiles Clojure code and Clojure runtime itself into more compact, faster to
load bytecode. Technically, Skummet is a fork of Clojure that introduces a few
changes to some of its classes. The changes are moderate in size (+533 -125) and touch only the compilation part — but not the way how Clojure
Here's the list of things Skummet does to achieve the promised size and bootstrap time reduction:
Skummet was designed with maximum compatibility in mind. Most Clojure code can be compiled with Skummet without any effort on the programmer's side. Although there may be issues with code that relies on referencing Var objects directly. See Troubleshooting section to get around this problem.
Tables below demonstrate how well Skummet performs on different platforms when compared to vanilla Clojure. Benchmarking application was a simple hello-world. JVM benchmark used zero extra dependencies, while Android benchmark also includes Neko for drawing a very simple interface in the starting activity. Both Skummet benchmarks were run through Proguard.
|Load time (seconds)||1.28||0.45||64.8|
|Jar size w/o source (KB)||3640||2299||36.8|
|Heap usage (after GC, KB)||3749||2506||33.2|
|Load time (first launch, seconds)||4.02||1.00||75.1|
|"Hot" load time (next launches, seconds)||3.61||0.79||78.1|
|APK size (KB)||1669||696||58.3|
|Heap usage (after GC, KB)||5469||2750||49.7|
The difference between Skummet for JVM and Android is only in tools you use it with.