[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/elisp-benchmarks 2c2c4fab5e1 13/54: * benchmarks/flet.el: Add ne
From: |
Pip Cet |
Subject: |
scratch/elisp-benchmarks 2c2c4fab5e1 13/54: * benchmarks/flet.el: Add new u-benchmark. |
Date: |
Sat, 4 Jan 2025 12:26:32 -0500 (EST) |
branch: scratch/elisp-benchmarks
commit 2c2c4fab5e1da5b48fe464d33fc3cefa42839501
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* benchmarks/flet.el: Add new u-benchmark.
---
benchmarks/benchmarks/flet.el | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/benchmarks/benchmarks/flet.el b/benchmarks/benchmarks/flet.el
new file mode 100644
index 00000000000..032980b8bf2
--- /dev/null
+++ b/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 6959d1ba946 02/54: * elisp-benchmarks.el: Include the benchmarks in the package!, (continued)
- scratch/elisp-benchmarks 6959d1ba946 02/54: * elisp-benchmarks.el: Include the benchmarks in the package!, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 6757a4b5d62 03/54: * elisp-benchmarks.el: Fix Author/maintainer info, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 1e23922cefe 04/54: Reduce test setup + increase `elb-listlen-tc-len' lenght, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks f682f7bf3ed 07/54: * benchmarks/nbody.el: New benchmark, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks db13e9eae2f 08/54: * benchmarks/dhrystone.el: New benchmark, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 67425127bc7 11/54: * elisp-benchmarks.el (elisp-benchmarks-run): Recompile by default., Pip Cet, 2025/01/04
- scratch/elisp-benchmarks be50d3ea30f 06/54: Increment version number, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks ef746b8e204 12/54: * Use the Emacs native compiler if available, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 898535f1045 27/54: * elisp-benchmarks.el (elb-runs): Fix group., Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 8f1d7eef864 05/54: Loop style nit in bubble-no-cons, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 2c2c4fab5e1 13/54: * benchmarks/flet.el: Add new u-benchmark.,
Pip Cet <=
- scratch/elisp-benchmarks 7e019d93f2d 14/54: * elisp-benchmarks.el (elisp-benchmarks-run): Minor, better regexp., Pip Cet, 2025/01/04
- scratch/elisp-benchmarks ac99d921411 15/54: * benchmarks/pcase.el: Add new u-benchmark., Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 43fe57b7d90 16/54: * benchmarks/map-closure.el: Add new u-benchmark., Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 370809463f2 17/54: ; * elisp-benchmarks.el: Tag new version and update copyright., Pip Cet, 2025/01/04
- scratch/elisp-benchmarks a9d26e8f320 18/54: * Update for new native-comp API + tag new version, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks e6717e1de7f 19/54: * benchmarks/pcase.el: Don't hide the real `pcase.el`, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks f5834702781 23/54: Make `comp-speed' explicit in each benchmark, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 00afe629432 20/54: Add new 'inclist-type-hints' benchmark + tag new version, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks 8d15a1e6601 26/54: Make `comp-speed' controllable through a customize, Pip Cet, 2025/01/04
- scratch/elisp-benchmarks a0d6af36237 28/54: * elisp-benchmarks.el: Bump new version., Pip Cet, 2025/01/04