Permalink
Browse files

Performance tuning

  • Loading branch information...
ayato-p committed Dec 3, 2017
1 parent a5f52ea commit a50589a568a55e33dc3518b70b26ea84866b13b7
Showing with 7 additions and 15 deletions.
  1. +7 −15 clj/hoge.clj
View
@@ -1,16 +1,8 @@
(let
[ lines
(seq
(clojure.string/split-lines
(slurp "../data.csv" ))) ]
(dotimes [ n 10 ]
(let [lines (clojure.string/split-lines
(slurp "../data.csv" ))]
(dotimes [n 10]
(time
(print
(apply
max
(map
#(read-string
(nth
(clojure.string/split % #",")
0))
lines))))))
(print
(->> lines
(map #(Long/parseLong (nth (.split ^String % ",") 0)))
(reduce max))))))

0 comments on commit a50589a

Please sign in to comment.