Skip to content

Instantly share code, notes, and snippets.

@timvisher
Created August 14, 2022 01:18
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 timvisher/90a9daff33a0a8bfe9cd5086bd598e00 to your computer and use it in GitHub Desktop.
Save timvisher/90a9daff33a0a8bfe9cd5086bd598e00 to your computer and use it in GitHub Desktop.
4.4.23$ grep -H '.*' x.clj; clojure -e "$(< x.clj)"
x.clj:(import '[java.nio.file Files FileVisitOption Path])
x.clj:(time
x.clj: (-> (Files/walk (Path/of "." (into-array String []))
x.clj: (into-array FileVisitOption []))
x.clj: (.iterator)
x.clj: iterator-seq
x.clj: count))
WARNING: Implicit use of clojure.main with options is deprecated, use -M
java.nio.file.Path
"Elapsed time: 42135.852273 msecs"
318274
4.4.23$ time find . -printf '.' | wc -c
318274
real 0m0.499s
user 0m0.084s
sys 0m0.241s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment