Skip to content

Instantly share code, notes, and snippets.

@cddr
Last active October 10, 2017 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cddr/7d1bd8a12b84e10f94ad04f178faecec to your computer and use it in GitHub Desktop.
Save cddr/7d1bd8a12b84e10f94ad04f178faecec to your computer and use it in GitHub Desktop.
clojure startup times
# traditional way to run program via lein
$ time lein run -m clojure.main -e '(println "yolo")'
yolo
real 0m6.678s
user 0m9.845s
sys 0m0.961s
# new clojure script (supported by tools.deps.alpha)
# in this test, we force clojure to compute the classpath before running the script
$ time clojure -Sforce -e '(println "yolo")'
yolo
real 0m4.004s
user 0m7.861s
sys 0m0.439s
# new clojure script (supported by tools.deps.alpha)
# in this test, we allow the clojure script to pick up the pre-computed classpath in $PROJECT/.cpcache
$ time clojure -e '(println "yolo")'
yolo
real 0m1.297s
user 0m2.254s
sys 0m0.171s
# lumo (bundled clojurescript)
$ time lumo -e '(println "yolo")'
yolo
real 0m0.654s
user 0m0.636s
sys 0m0.071s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment