Update benchmark numbers in examples

This commit updates the benchmark numbers in various example files. The
changes reflect recent performance optimizations or adjustments to the
benchmarking environment.
This commit is contained in:
Michael Schimmel
2026-02-22 16:13:11 +01:00
parent 2fdeff1db4
commit c03b2af770
23 changed files with 43 additions and 43 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
;; Closure Scope Test ;; Closure Scope Test
;; Benchmark: 779ns ;; Benchmark: 436ns
;; Benchmark-Repeat: 2613 ;; Benchmark-Repeat: 4610
;; Output: 15 ;; Output: 15
(do (do
(def make-adder (fn [x] (def make-adder (fn [x]
+2 -2
View File
@@ -1,4 +1,4 @@
;; Benchmark: 130ns ;; Benchmark: 129ns
;; Benchmark-Repeat: 15355 ;; Benchmark-Repeat: 15551
;; Output: 5 ;; Output: 5
(((fn [x] (fn [] x)) 5)) (((fn [x] (fn [] x)) 5))
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 620ns ;; Benchmark: 129ns
;; Benchmark-Repeat: 3234 ;; Benchmark-Repeat: 15494
;; Output: 5 ;; Output: 5
(do (do
(def f (fn [x] (fn [] x))) (def f (fn [x] (fn [] x)))
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 1.1us ;; Benchmark: 129ns
;; Benchmark-Repeat: 1848 ;; Benchmark-Repeat: 15458
;; Output: 42 ;; Output: 42
(do (do
(def f (fn [a] (fn [b] (fn [c] (+ a (+ b c)))))) (def f (fn [a] (fn [b] (fn [c] (+ a (+ b c))))))
+1 -1
View File
@@ -1,5 +1,5 @@
;; Complex Data Structure Test ;; Complex Data Structure Test
;; Benchmark: 53.6us ;; Benchmark: 53.5us
;; Benchmark-Repeat: 39 ;; Benchmark-Repeat: 39
;; Output: {:name "Fibonacci", :input 10, :output 55} ;; Output: {:name "Fibonacci", :input 10, :output 55}
(do (do
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 336ns ;; Benchmark: 326ns
;; Benchmark-Repeat: 5959 ;; Benchmark-Repeat: 6129
;; examples/def_local_inlining.myc ;; examples/def_local_inlining.myc
;; Demonstrates potential for DefLocal-Inlining (Phase 2.5) ;; Demonstrates potential for DefLocal-Inlining (Phase 2.5)
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 2.4us ;; Benchmark: 2.1us
;; Benchmark-Repeat: 848 ;; Benchmark-Repeat: 961
;; Comprehensive Destructuring Test ;; Comprehensive Destructuring Test
;; Covers: Nested tuples, mixed params, dynamic passing ;; Covers: Nested tuples, mixed params, dynamic passing
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 1.4us ;; Benchmark: 129ns
;; Benchmark-Repeat: 1448 ;; Benchmark-Repeat: 15452
;; Output: 36 ;; Output: 36
(do (do
;; Excessive capture test ;; Excessive capture test
+2 -2
View File
@@ -1,6 +1,6 @@
;; Fibonacci Recursive ;; Fibonacci Recursive
;; Benchmark: 53.7us ;; Benchmark: 51.5us
;; Benchmark-Repeat: 39 ;; Benchmark-Repeat: 40
;; Output: 55 ;; Output: 55
(do (do
(def fib (fn [n] (def fib (fn [n]
+2 -2
View File
@@ -1,4 +1,4 @@
;; Benchmark: 143ns ;; Benchmark: 129ns
;; Benchmark-Repeat: 14112 ;; Benchmark-Repeat: 15624
;; Output: 30 ;; Output: 30
(+ 10 20) (+ 10 20)
+2 -2
View File
@@ -1,6 +1,6 @@
;; Higher-Order Function Example ;; Higher-Order Function Example
;; Benchmark: 706ns ;; Benchmark: 130ns
;; Benchmark-Repeat: 2798 ;; Benchmark-Repeat: 15499
;; Output: 25 ;; Output: 25
(do (do
(def apply (fn [f x] (f x))) (def apply (fn [f x] (f x)))
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 354ns ;; Benchmark: 351ns
;; Benchmark-Repeat: 5640 ;; Benchmark-Repeat: 5716
;; Financial DSL Macro example ;; Financial DSL Macro example
;; Demonstrates generating complex records from simple parameters. ;; Demonstrates generating complex records from simple parameters.
;; Output: {:price 100, :size 2, :total 200} ;; Output: {:price 100, :size 2, :total 200}
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 237ns ;; Benchmark: 236ns
;; Benchmark-Repeat: 8555 ;; Benchmark-Repeat: 8524
;; Output: 5 ;; Output: 5
(do (do
(def y 1) (def y 1)
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 198ns ;; Benchmark: 195ns
;; Benchmark-Repeat: 10207 ;; Benchmark-Repeat: 10247
;; Nested Macro and Arithmetic example ;; Nested Macro and Arithmetic example
;; Output: 81 ;; Output: 81
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 259ns ;; Benchmark: 237ns
;; Benchmark-Repeat: 7947 ;; Benchmark-Repeat: 8394
;; Macro Splicing example ;; Macro Splicing example
;; Demonstrates unrolling a list into another list. ;; Demonstrates unrolling a list into another list.
;; Output: [0 1 2 3 4] ;; Output: [0 1 2 3 4]
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 146ns ;; Benchmark: 128ns
;; Benchmark-Repeat: 14044 ;; Benchmark-Repeat: 15586
;; Classic "unless" macro example ;; Classic "unless" macro example
;; Demonstrates simple template substitution. ;; Demonstrates simple template substitution.
;; Output: 42 ;; Output: 42
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 448ns ;; Benchmark: 129ns
;; Benchmark-Repeat: 4564 ;; Benchmark-Repeat: 15483
(do (do
(def area (fn [x] (* PI x))) (def area (fn [x] (* PI x)))
(area 10) (area 10)
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 666ns ;; Benchmark: 212ns
;; Benchmark-Repeat: 2975 ;; Benchmark-Repeat: 9439
(do (do
;; 1. Provokation Stack-Gap (bei Optimization Level 2) ;; 1. Provokation Stack-Gap (bei Optimization Level 2)
(def result (def result
+2 -2
View File
@@ -1,7 +1,7 @@
;; Record to Tuple Mapping Test ;; Record to Tuple Mapping Test
;; Output: 30 ;; Output: 30
;; Benchmark: 760ns ;; Benchmark: 727ns
;; Benchmark-Repeat: 2612 ;; Benchmark-Repeat: 2764
(do (do
(def rec {:x 10 :y 20}) (def rec {:x 10 :y 20})
+2 -2
View File
@@ -2,8 +2,8 @@
;; This test calls a function that destructures a record ;; This test calls a function that destructures a record
;; Current implementation is now zero-allocation for destructuring. ;; Current implementation is now zero-allocation for destructuring.
;; Output: 3 ;; Output: 3
;; Benchmark: 740ns ;; Benchmark: 698ns
;; Benchmark-Repeat: 2745 ;; Benchmark-Repeat: 2875
(do (do
(def process (fn [[x y]] (def process (fn [[x y]]
+2 -2
View File
@@ -2,8 +2,8 @@
;; heavily recursive, benefits significantly from specialization of integer arithmetic ;; heavily recursive, benefits significantly from specialization of integer arithmetic
;; and direct function calls (skipping dynamic dispatch). ;; and direct function calls (skipping dynamic dispatch).
;; Output: 5 ;; Output: 5
;; Benchmark: 488.0us ;; Benchmark: 471.7us
;; Benchmark-Repeat: 6 ;; Benchmark-Repeat: 6
(do (do
+1 -1
View File
@@ -1,4 +1,4 @@
;; Benchmark: 2.9ms ;; Benchmark: 2.8ms
;; Output: "done" ;; Output: "done"
(do (do
(def count_down (fn [n] (def count_down (fn [n]
+1 -1
View File
@@ -1,5 +1,5 @@
;; Benchmark: 1.9us ;; Benchmark: 1.9us
;; Benchmark-Repeat: 1043 ;; Benchmark-Repeat: 1042
;; Demonstration of N-dimensional Tuples, Vectors, and Matrices ;; Demonstration of N-dimensional Tuples, Vectors, and Matrices
;; Based on docs/Tupel 1.md ;; Based on docs/Tupel 1.md
;; ;;