Closed xuchunyang closed 8 years ago
Because it is not necessary, e.g., we don't need pipe output between commands, and it can improve performance:
;; Original: (measure-time (fcitx--active-p)) ⇒ "0.033646" ;; This version: (measure-time (fcitx--active-p)) ⇒ "0.027410" (defmacro measure-time (&rest body) "Measure the time it takes to evaluate BODY." `(let ((time (current-time))) ,@body (message "%.06f" (float-time (time-since time)))))
Thanks! Seems calling as the shell command causes many issues.
Because it is not necessary, e.g., we don't need pipe output between commands, and it can improve performance: