A quick comparison with python: > time python -c 'print("Hello world!")' Hello world! 0.03s user 0.01s system 80% cpu 0.048 total
> /usr/bin/time -l python -c 'print("Hello world!")' Hello world! 0.04 real 0.02 user 0.01 sys 6 maximum resident set size (MB) 2110 page reclaims 24 involuntary context switches So the Python version *takes 5x longer*, and uses *3x more memory.* On Tue, Nov 12, 2019 at 12:58 PM Nate Sutton <n...@sutton.me> wrote: > Another way to achieve fast startup is to compile clojurescript to a > nodejs target and then use the nodejs library called pkg to bundle the > nodejs binary with the script. I haven't timed it but it's an interesting > alternative. > > On Tue, Nov 12, 2019 at 12:46 PM Colin Yates <colin.ya...@gmail.com> > wrote: > >> Do we have any idea how that memory saving scales? >> >> I know a bunch of meta data isn’t needed as it is hotspot specific, but >> are there any other memory savings? >> >> Sent from my iPhone >> >> On 12 Nov 2019, at 18:42, Alan Thompson <clooj...@gmail.com> wrote: >> >> In my initial post, I failed to mention the huge memory savings achieved >> by the standalone executable (in addition to the startup time savings). >> >> Note that using *time* at the command line resolves to a shell built-in >> command. We can get more information from the standard Unix version of time: >> # JVM+UberJar >> > /usr/bin/time -l java -jar >> target/hello-world-0.1.0-SNAPSHOT-standalone.jar >> Hello, World! >> Goodbye... >> 1.20 real 2.47 user 0.24 sys >> 409 maximum resident set size (MB) >> 100469 page reclaims >> 3569 involuntary context switches >> >> # Static Executable >> > /usr/bin/time -l target/hello-world >> Hello, World! >> Goodbye... >> 0.00 real 0.00 user 0.00 sys >> 2 maximum resident set size (MB) >> 657 page reclaims >> 4 involuntary context switches >> So we see that the maximum RSS memory requirement *was reduced from 409 >> MB to 2 MB*. Yes, an improvement *over 200x!* Note also that context >> switches have been *reduced by 900x,* and page reclaims by *about 200x*. >> >> So, it is the combination of reduced startup time and vastly reduced >> memory requirements that make standalone executables ideal for short-lived >> tasks, especially in constrained environments such as serverless/lambda. >> >> >> >> On Sun, Nov 10, 2019 at 7:54 AM Michiel Borkent <michielbork...@gmail.com> >> wrote: >> >>> Might be worth mentioning that lread and I are collecting information >>> about GraalVM here: >>> >>> https://github.com/lread/clj-graal-docs >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to clojure@googlegroups.com >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> clojure+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/clojure?hl=en >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to clojure+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/clojure/8dbd1a23-61b4-42dc-8815-3d8422956901%40googlegroups.com >>> <https://groups.google.com/d/msgid/clojure/8dbd1a23-61b4-42dc-8815-3d8422956901%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clojure@googlegroups.com >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/clojure/CAN67zA1USV_sX0bP%3Dg-p0r7%2BqMOvYscWY9aj7yBnYsSeikcskQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/clojure/CAN67zA1USV_sX0bP%3Dg-p0r7%2BqMOvYscWY9aj7yBnYsSeikcskQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clojure@googlegroups.com >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/clojure/9657973F-BAD3-4EBE-8648-7FA492F19E76%40gmail.com >> <https://groups.google.com/d/msgid/clojure/9657973F-BAD3-4EBE-8648-7FA492F19E76%40gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/clojure/CAMZDCY27dkBUDzTM08qEAL_VeSjE0%2BRbK76CnUiynNPWQS_N0Q%40mail.gmail.com > <https://groups.google.com/d/msgid/clojure/CAMZDCY27dkBUDzTM08qEAL_VeSjE0%2BRbK76CnUiynNPWQS_N0Q%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/CAN67zA2pbX32qKxPBXQCS48pRykTn95z3DVb-Y_7v1mbL5Os_g%40mail.gmail.com.