#! /usr/local/bin/emacs --script ;;; el-shell --- el shell it -*- lexical-binding: t -*- ;; ;; Typical times are 2.0 - 5.0 ms each. For the entire thing. Graphics ;; or not doesn't really matter and is sometimes faster, sometimes ;; slower. See home page: https://dataswamp.org/~incal/el-gpu [efti] (push "." load-path) (require 'el-gpu "el-gpu.elc") (let* ((beg) (tme) (gfx (evenp (random 100))) (name "(el-gpu)" ) (gfx-label "/gfx .....") (spc-label " .........") (cmd (string-join command-line-args-left [32])) (pause 3)) (when (and (stringp cmd) (not (zerop (length cmd)))) ;; init (setq current-time-list nil) (emacs_gpu_init) ;; first (setf beg (apix-time-ticks)) (el-shell cmd gfx) (setf ms (/ (* 1000 (- (apix-time-ticks) beg)) (apix-time-hz))) (message " %s text%s %.1f ms" name (if gfx gfx-label spc-label) ms) (sleep-for pause) ;; second (setf beg (apix-time-ticks)) (el-shell cmd (not gfx)) (setf ms (/ (* 1000 (- (apix-time-ticks) beg)) (apix-time-hz))) (message " %s text%s %.1f ms" name (if (not gfx) gfx-label spc-label) ms) (sleep-for pause) ;; done (emacs_gpu_quit 0)))