speed-comparison.el (1105B)
1 ;; takes a file containing edn file names, one per line 2 ;; 3 ;; locate *.edn > edn.list 4 ;; 5 ;; results end up as edn in *edn-parse-time-results* 6 (with-current-buffer (find-file-noselect "edn.list") 7 (goto-char 1) 8 (while (and (< (point) (point-max))) 9 (end-of-line) 10 (let* ((fn (buffer-substring-no-properties (line-beginning-position) (point))) 11 (buff (find-file-noselect fn)) 12 (edn-time 0) 13 (clj-time 0)) 14 ;;(message fn) 15 (with-current-buffer buff 16 (let ((start (time-to-seconds (current-time)))) 17 (parseedn-read) 18 (setq clj-time (+ clj-time (- (time-to-seconds (current-time)) start)))) 19 (goto-char 1) 20 (let ((start (time-to-seconds (current-time)))) 21 (edn-read) 22 (setq edn-time (+ edn-time (- (time-to-seconds (current-time)) start))))) 23 (kill-buffer buff) 24 (when (< (point) (point-max)) (right-char)) 25 (with-current-buffer "*edn-parse-time-results*" 26 (insert "{:file \"" fn "\", :edn-time " (number-to-string edn-time) ", :clj-time " (number-to-string clj-time) "}\n")))))