[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/elisp-benchmarks bec6f1ea802 13/54: * benchmarks/flet.el: Add ne
From: |
Pip Cet |
Subject: |
scratch/elisp-benchmarks bec6f1ea802 13/54: * benchmarks/flet.el: Add new u-benchmark. |
Date: |
Mon, 30 Dec 2024 22:40:41 -0500 (EST) |
branch: scratch/elisp-benchmarks
commit bec6f1ea802781297bd8a88f220c6ec5e55d1c48
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* benchmarks/flet.el: Add new u-benchmark.
---
elisp-benchmarks/benchmarks/flet.el | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/elisp-benchmarks/benchmarks/flet.el
b/elisp-benchmarks/benchmarks/flet.el
new file mode 100644
index 00000000000..032980b8bf2
--- /dev/null
+++ b/elisp-benchmarks/benchmarks/flet.el
@@ -0,0 +1,41 @@
+;; -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2020 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Apply a local function cl-flet defined on each element of list.
+
+(require 'cl-lib)
+
+(defvar elb-flet-len 50000)
+(defvar elb-flet-list
+ (mapcar #'random (make-list elb-flet-len 1000)))
+
+(defun elb-flet (l)
+ (cl-flet ((f (x)
+ (or (> x 750)
+ (< x 250))))
+ (cl-loop for x in l
+ count (f x))))
+
+(defun elb-flet-entry ()
+ (cl-loop repeat 2500
+ do (elb-flet elb-flet-list)))
+
+(provide 'elb-flet)
- scratch/elisp-benchmarks 350b95f6082 10/54: * elisp-benchmarks.el: Typo fix, (continued)
- scratch/elisp-benchmarks 350b95f6082 10/54: * elisp-benchmarks.el: Typo fix, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks d0963279fec 16/54: * benchmarks/map-closure.el: Add new u-benchmark., Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 69a99de283a 20/54: Add new 'inclist-type-hints' benchmark + tag new version, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks a29db7b9366 18/54: * Update for new native-comp API + tag new version, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 7b4f68f6866 17/54: ; * elisp-benchmarks.el: Tag new version and update copyright., Pip Cet, 2024/12/30
- scratch/elisp-benchmarks c5680501af1 24/54: Allow for GC to kick in pidigit, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks dd2ba559d66 27/54: * elisp-benchmarks.el (elb-runs): Fix group., Pip Cet, 2024/12/30
- scratch/elisp-benchmarks e372bd14f52 38/54: Make it usable on Emacs-27, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks eb485e9acf3 25/54: Revert "Make `comp-speed' explicit in each benchmark", Pip Cet, 2024/12/30
- scratch/elisp-benchmarks c9be2a398f5 14/54: * elisp-benchmarks.el (elisp-benchmarks-run): Minor, better regexp., Pip Cet, 2024/12/30
- scratch/elisp-benchmarks bec6f1ea802 13/54: * benchmarks/flet.el: Add new u-benchmark.,
Pip Cet <=
- scratch/elisp-benchmarks 99b6355dd4b 01/54: New package initial add, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 68a4f973d26 15/54: * benchmarks/pcase.el: Add new u-benchmark., Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 6ddebbaf77c 35/54: * benchmarks/elb-eieio.el: Fix copyright, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks a37a34f85ff 42/54: ; Prefer HTTPS to HTTP in URLs, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 2b62a9ebace 46/54: * Handle 'compilation-safety', Pip Cet, 2024/12/30
- scratch/elisp-benchmarks b724a4974d1 21/54: * elisp-benchmarks.el (elisp-benchmarks-run): Use featurep to detect nativecomp, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 222025aeae6 05/54: Loop style nit in bubble-no-cons, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks f36510af7f9 02/54: * elisp-benchmarks.el: Include the benchmarks in the package!, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 768dd915ac9 09/54: * elisp-benchmarks.el: Increase minor package version, Pip Cet, 2024/12/30
- scratch/elisp-benchmarks 46d7b2fcc6a 29/54: * benchmarks/pack-unpack.el: New file., Pip Cet, 2024/12/30