From 6e0af4bd7e30828e5ac2b005b9efde15a753dfbc Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Tue, 21 Nov 2023 16:51:09 -0500 Subject: [PATCH] Free benchmark.md from LFS --- .repo-assets/benchmark.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.repo-assets/benchmark.md b/.repo-assets/benchmark.md index 47bf518..e6c54f3 100644 --- a/.repo-assets/benchmark.md +++ b/.repo-assets/benchmark.md @@ -1,3 +1,20 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7bb22f786b2a5e3f01d1c784b320f6451bf093ceb049d9b45f7c283344635495 -size 670 +```lisp +;; Emacs 29 with native compilation, default GC threshold +;; Run in a lisp-interaction buffer with Flymake + +(defun time-mode-line (num &optional and-mem) + (let ((gc-cons-threshold (if and-mem gc-cons-threshold most-positive-fixnum)) + (start-time (current-time))) + (cl-loop for i to num + do (format-mode-line mode-line-format)) + (format-time-string "%s.%3N" (time-since start-time)))) + +;; Default mode line: +(time-mode-line 10000) ;; "0.440" +(time-mode-line 10000 :and-mem) ;; "2.402" + +;; mood-line (default settings): +(mood-line-mode t) +(time-mode-line 10000) ;; "0.309" +(time-mode-line 10000 :and-mem) ;; "1.286" +```