Skip to content

Instantly share code, notes, and snippets.

@ato
ato / gist:2036052
Created March 14, 2012 12:08
Clojure startup time hack: refer
clojure.core/refer is relatively heavyweight. It gets called 7 times during Clojure
startup (4 times in 1.3.0). There's potential to shave off 10% of the startup time
by improving it. Probably even more for projects with a large number of small
namespaces.
This is just a quick experiment to see what's possible, it would need much refining.
It's not thread safe, doesn't print warnings and could probably be written more
elegantly.
java -Xbootclasspath/a:clojure.jar -cp clojure.jar clojure.main -e "(System/exit 0)"