[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/elisp-benchmarks 81cd14929b9 12/54: * Use the Emacs native compi
From: |
Pip Cet |
Subject: |
scratch/elisp-benchmarks 81cd14929b9 12/54: * Use the Emacs native compiler if available |
Date: |
Mon, 30 Dec 2024 22:40:40 -0500 (EST) |
branch: scratch/elisp-benchmarks
commit 81cd14929b9eb8188a166edf5e6c381639a8c9e0
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Use the Emacs native compiler if available
* elisp-benchmarks.el: Update version.
(elisp-benchmarks-run): Use native compiler if available.
---
elisp-benchmarks/elisp-benchmarks.el | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/elisp-benchmarks/elisp-benchmarks.el
b/elisp-benchmarks/elisp-benchmarks.el
index 5ac9b44e768..9e706209413 100644
--- a/elisp-benchmarks/elisp-benchmarks.el
+++ b/elisp-benchmarks/elisp-benchmarks.el
@@ -4,7 +4,7 @@
;; Author: Andrea Corallo <akrl@sdf.org>
;; Maintainer: Andrea Corallo <akrl@sdf.org>
-;; Version: 1.4
+;; Version: 1.5
;; Keywords: languages, lisp
;; Package-Type: multi
;; Created: 2019-01-12
@@ -85,6 +85,10 @@ RECOMPILE all the benchmark folder when non nil."
repeat runs
for i from 1
named test-loop
+ with native-comp = (boundp 'comp-ctxt) ; FIXME when possible
+ with compile-function = (if native-comp
+ #'native-compile
+ #'byte-compile-file)
with res = (make-hash-table :test #'equal)
with sources = (directory-files elb-bench-directory t "\\.el$")
with tests = (if selector
@@ -93,9 +97,20 @@ RECOMPILE all the benchmark folder when non nil."
collect (file-name-base f))
(mapcar #'file-name-base sources))
initially
- (if recompile
- (mapc (lambda (f) (byte-compile-file f t)) sources)
- (mapc #'load (mapcar #'file-name-sans-extension sources)))
+ (when native-comp
+ (require 'comp)
+ (setf comp-speed 3))
+ ;; Compile
+ (when recompile
+ (mapc (lambda (f)
+ (message "Compiling... %s" f)
+ (funcall compile-function f t))
+ sources))
+ ;; Load
+ (mapc #'load (mapcar (if native-comp
+ #'comp-output-filename
+ #'file-name-sans-extension)
+ sources))
(cl-loop for test in tests
do (puthash test () res))
do
- scratch/elisp-benchmarks 09b68bdaabf 41/54: * elisp-benchmarks.el: Bump version, (continued)
- scratch/elisp-benchmarks 09b68bdaabf 41/54: * elisp-benchmarks.el: Bump version, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks ffe5fd6b642 40/54: * benchmarks/elb-scroll.el (elb-scroll-entry): Load native code when available, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 5c15316e5e4 39/54: * benchmarks/elb-scroll.el: New benchmark, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 472cb38e582 44/54: ; * elisp-benchmarks.el: Update my mail, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 05079cd8174 50/54: elisp-benchmarks.el: Compact output and support setup code, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 1675aa61b84 32/54: ; * benchmarks/pack-unpack.el: Remove unnecessary newlines., Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 8d62f921433 51/54: elisp-benchmarks.el: Fix regression in output format, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 0b955aeabbc 45/54: ; * elisp-benchmarks.el: Update copyright year, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 5d3a6564227 53/54: Add "make elisp-benchmarks" target, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks b4b10726cda 54/54: New script to import an elpa module, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 81cd14929b9 12/54: * Use the Emacs native compiler if available,
Pip Cet <=
- scratch/elisp-benchmarks 6326535d976 22/54: * Fix for new `native-compile' interface and bump new version, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks c171f1b8144 33/54: * elisp-benchmarks.el (elisp-benchmarks-run): Fix for non-native emacs, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 400690828d1 52/54: Add "elisp-benchmarks" package from ELPA, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 17c6be0ee5c 19/54: * benchmarks/pcase.el: Don't hide the real `pcase.el`, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 49619b889c0 28/54: * elisp-benchmarks.el: Bump new version., Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 85f201476ab 36/54: * benchmarks/elb-smie.el: New benchmark, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 8ca8641e1ec 34/54: Add EIEIO benchmark, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 49031182944 37/54: * benchmarks/elb-bytecomp.el: New benchmark, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 58be34f645c 43/54: * benchmarks/elb-smie.el (elb-font-lock-entry): New benchmark, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks d75e4e0b7d9 47/54: * elisp-benchmarks.el: Bump new version., Pip Cet, 2024/12/30