emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/elisp-benchmarks 58be34f645c 43/54: * benchmarks/elb-smie.el (el


From: Pip Cet
Subject: scratch/elisp-benchmarks 58be34f645c 43/54: * benchmarks/elb-smie.el (elb-font-lock-entry): New benchmark
Date: Mon, 30 Dec 2024 22:40:44 -0500 (EST)

branch: scratch/elisp-benchmarks
commit 58be34f645ccc6014a7dc4e6757c46e2d6fcd8a6
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * benchmarks/elb-smie.el (elb-font-lock-entry): New benchmark
---
 elisp-benchmarks/benchmarks/elb-smie.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/elisp-benchmarks/benchmarks/elb-smie.el 
b/elisp-benchmarks/benchmarks/elb-smie.el
index 259c9ea0d38..b423e7af087 100644
--- a/elisp-benchmarks/benchmarks/elb-smie.el
+++ b/elisp-benchmarks/benchmarks/elb-smie.el
@@ -1,6 +1,6 @@
 ;;; elb-smie.el --- C major mode based on SMIE  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2015-2022  Free Software Foundation, Inc.
+;; Copyright (C) 2015-2023  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; Version: 1.1
@@ -897,5 +897,14 @@ Past this column, we do not try to align the backslashes."
     (dotimes (_ 5)
       (indent-region (point-min) (point-max)))))
 
+(defun elb-font-lock-entry ()
+  (with-temp-buffer
+    (insert-file-contents (expand-file-name
+                           "../resources/xmenu.c" elb-bench-directory))
+    (elb-smie-mode)
+    (dotimes (_ 50)
+      (font-lock-flush)
+      (font-lock-ensure))))
+
 (provide 'elb-smie)
 ;;; elb-smie.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]