Hacker News new | past | comments | ask | show | jobs | submit login

Don't some Common Lisp implementations support heap snapshots? Might improve Clojure startup time.





They do, and, thanks to GraalVM’s Substrate compiler, the same technique is also available for Clojure directly on the JVM. I imagine you’re going to pay some cost in both cases, perhaps in different places. (I imagine with Cloture it might be at development time, but once your program works the compiler won’t break it—-with Graal you don’t notice a thing during development but the compiler breaks plenty of programs.)

These are different things.

https://github.com/oracle/graal/blob/master/substratevm/LIMI...

Where SBCL just adds some compiled code, writes a memory dump out in a second. Then this can be run as a new SBCL with added code - it still includes the compiler, and all other stuff. One can also then add more code and write another image... The new image is just like the other one, just with more code and otherwise the usual feature set.

This includes the whole SBCL and my code, not just a static application with limited dynamic features.

Many Common Lisp systems have a way to write a snapshot of the developed environment, which then starts in subsecond.

Additionally some Common Lisps have ways to do application or shared library delivery, which can remove dynamic features, remove parts of the development tools, remove unused code/data, etc. This may be similar like doing heap dumps, but with added optimization phases.


Yes, most have a variant where you can dump the image, maybe with a tree-shake even: http://www.sbcl.org/manual/#Saving-a-Core-Image



Applications are open for YC Summer 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: