Skip to content

Instantly share code, notes, and snippets.

@oakmac
Created February 3, 2016 00:53
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 oakmac/e6749a63565249e296d6 to your computer and use it in GitHub Desktop.
Save oakmac/e6749a63565249e296d6 to your computer and use it in GitHub Desktop.
(defn- now []
(System/currentTimeMillis))
(defn- speed-test []
(let [lots-o-clojure (slurp "tests/really_long_file")
before-indent (now)
result1 (indent-mode lots-o-clojure nil nil nil)
after-indent (now)
before-paren (now)
result2 (paren-mode lots-o-clojure nil nil nil)
after-paren (now)]
(println (str "Indent Mode: " (- after-indent before-indent) "ms"))
(println (str "Paren Mode: " (- after-paren before-paren) "ms"))))
(defn -main [& args]
(speed-test))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment