emacs-diffs
[Top][All Lists]
Advanced

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

scratch/elisp-benchmarks f43385543fc 46/54: * Handle 'compilation-safety


From: Pip Cet
Subject: scratch/elisp-benchmarks f43385543fc 46/54: * Handle 'compilation-safety'
Date: Sat, 4 Jan 2025 12:26:37 -0500 (EST)

branch: scratch/elisp-benchmarks
commit f43385543fc65e13e2f462f6a02ccd35685d8b32
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * Handle 'compilation-safety'
    
    * elisp-benchmarks.el (bytecomp): Require it.
    : Silence warning if 'compilation-safety' is not defined.
    (elb-safety): Define.
    (elisp-benchmarks-run): Make use of.
---
 benchmarks/elisp-benchmarks.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/benchmarks/elisp-benchmarks.el b/benchmarks/elisp-benchmarks.el
index 855d5af4443..0e2d9dcbc5b 100644
--- a/benchmarks/elisp-benchmarks.el
+++ b/benchmarks/elisp-benchmarks.el
@@ -46,9 +46,12 @@
 (require 'benchmark)
 (require 'outline)
 (require 'org)
+(require 'bytecomp)
 (if (featurep 'native-compile)
     (require 'comp)
   (defvar native-comp-speed))
+(unless (boundp 'compilation-safety)
+  (defvar compilation-safety))
 
 (defgroup elb nil
   "Emacs Lisp benchmarks."
@@ -62,6 +65,10 @@
   "Default `native-comp-speed' to be used for native compiling the benchmarks."
   :type 'number)
 
+(defcustom elb-safety 0
+  "Default `compilation-safety' to be used for native compiling the 
benchmarks."
+  :type 'number)
+
 (defconst elb-bench-directory
   (expand-file-name "benchmarks/"
                    (file-name-directory
@@ -93,6 +100,7 @@ RECOMPILE all the benchmark folder when non nil."
    (when current-prefix-arg
      (list (read-regexp "Run benchmark matching: "))))
   (let* ((native-comp-speed elb-speed)
+        (compilation-safety elb-safety)
         (compile-function (if (featurep 'native-compile)
                               #'native-compile
                             #'byte-compile-file))



reply via email to

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