Update benchmark results in examples

This commit is contained in:
2026-03-17 17:33:24 +01:00
parent 5ca069d93d
commit e4be31729e
33 changed files with 65 additions and 60 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 1.8us ;; Benchmark: 1.2us
;; Benchmark-Repeat: 1122 ;; Benchmark-Repeat: 1658
;; Output: 120 ;; Output: 120
(do (do
(def factorial (fn [n acc] (def factorial (fn [n acc]
+2 -2
View File
@@ -1,6 +1,6 @@
;; Closure Scope Test ;; Closure Scope Test
;; Benchmark: 416ns ;; Benchmark: 55ns
;; Benchmark-Repeat: 4848 ;; Benchmark-Repeat: 36184
;; 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: 89ns ;; Benchmark: 56ns
;; Benchmark-Repeat: 23053 ;; Benchmark-Repeat: 36321
;; Output: 5 ;; Output: 5
(((fn [x] (fn [] x)) 5)) (((fn [x] (fn [] x)) 5))
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 89ns ;; Benchmark: 55ns
;; Benchmark-Repeat: 23311 ;; Benchmark-Repeat: 36269
;; 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: 87ns ;; Benchmark: 55ns
;; Benchmark-Repeat: 23196 ;; Benchmark-Repeat: 36160
;; 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))))))
+2 -2
View File
@@ -1,6 +1,6 @@
;; Complex Data Structure Test ;; Complex Data Structure Test
;; Benchmark: 32.9us ;; Benchmark: 33.5us
;; Benchmark-Repeat: 61 ;; Benchmark-Repeat: 62
;; Output: {:name "Fibonacci", :input 10, :output 55} ;; Output: {:name "Fibonacci", :input 10, :output 55}
(do (do
(def fib (fn [n] (def fib (fn [n]
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 300ns ;; Benchmark: 226ns
;; Benchmark-Repeat: 6698 ;; Benchmark-Repeat: 8861
;; 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: 773ns ;; Benchmark: 651ns
;; Benchmark-Repeat: 2598 ;; Benchmark-Repeat: 3012
;; 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: 85ns ;; Benchmark: 55ns
;; Benchmark-Repeat: 23630 ;; Benchmark-Repeat: 35723
;; 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: 32.8us ;; Benchmark: 33.3us
;; Benchmark-Repeat: 62 ;; Benchmark-Repeat: 63
;; Output: 55 ;; Output: 55
(do (do
(def fib (fn [n] (def fib (fn [n]
+2 -2
View File
@@ -1,4 +1,4 @@
;; Benchmark: 87ns ;; Benchmark: 55ns
;; Benchmark-Repeat: 23361 ;; Benchmark-Repeat: 35210
;; 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: 86ns ;; Benchmark: 56ns
;; Benchmark-Repeat: 23023 ;; Benchmark-Repeat: 36342
;; 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: 88ns ;; Benchmark: 73ns
;; Benchmark-Repeat: 22522 ;; Benchmark-Repeat: 30580
;; 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: 246ns ;; Benchmark: 176ns
;; Benchmark-Repeat: 8261 ;; Benchmark-Repeat: 11632
;; Output: 5 ;; Output: 5
(do (do
(def y 1) (def y 1)
+2
View File
@@ -1,3 +1,5 @@
;; Benchmark: 55ns
;; Benchmark-Repeat: 35990
;; Output: 42 ;; Output: 42
(do (do
(macro t [x] `(fn [~x] ~x)) (macro t [x] `(fn [~x] ~x))
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 194ns ;; Benchmark: 113ns
;; Benchmark-Repeat: 10337 ;; Benchmark-Repeat: 19089
;; Nested Macro and Arithmetic example ;; Nested Macro and Arithmetic example
;; Output: 81 ;; Output: 81
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 195ns ;; Benchmark: 136ns
;; Benchmark-Repeat: 10279 ;; Benchmark-Repeat: 14587
;; 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: 87ns ;; Benchmark: 55ns
;; Benchmark-Repeat: 23129 ;; Benchmark-Repeat: 36062
;; 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: 1.4us ;; Benchmark: 1.2us
;; Benchmark-Repeat: 1473 ;; Benchmark-Repeat: 1731
;; Output: [150 130 "Insufficient funds" 130] ;; Output: [150 130 "Insufficient funds" 130]
; --------------------------------------------------------- ; ---------------------------------------------------------
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 86ns ;; Benchmark: 55ns
;; Benchmark-Repeat: 23328 ;; Benchmark-Repeat: 36353
;; Output: 13 ;; Output: 13
(do (do
(macro wrap [f] `(fn [x] (~f x))) (macro wrap [f] `(fn [x] (~f x)))
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 87ns ;; Benchmark: 68ns
;; Benchmark-Repeat: 23072 ;; Benchmark-Repeat: 36112
;; Output: 31.41592653589793 ;; Output: 31.41592653589793
(do (do
(def area (fn [x] (* PI x))) (def area (fn [x] (* PI x)))
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 167ns ;; Benchmark: 102ns
;; Benchmark-Repeat: 12120 ;; Benchmark-Repeat: 20685
;; Output: [42 150] ;; Output: [42 150]
(do (do
;; 1. Provokation Stack-Gap (bei Optimization Level 2) ;; 1. Provokation Stack-Gap (bei Optimization Level 2)
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 2.1us ;; Benchmark: 1.4us
;; Benchmark-Repeat: 921 ;; Benchmark-Repeat: 1423
;; Output: <StreamNode> ;; Output: <StreamNode>
(do (do
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 2.3us ;; Benchmark: 2.1us
;; Benchmark-Repeat: 870 ;; Benchmark-Repeat: 966
;; Output: <StreamNode> ;; Output: <StreamNode>
(do (do
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 1.0ms ;; Benchmark: 882.7us
;; Benchmark-Repeat: 3 ;; Benchmark-Repeat: 4
;; Tests the effect of record inlining and field lookup optimization ;; Tests the effect of record inlining and field lookup optimization
;; Output: 10000 ;; Output: 10000
(do (do
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 1.1us ;; Benchmark: 834ns
;; Benchmark-Repeat: 1895 ;; Benchmark-Repeat: 2387
;; Test Record SoA specialization in Pipelines ;; Test Record SoA specialization in Pipelines
;; Dank der neuen Spezialisierung wird hierfür im Hintergrund ;; Dank der neuen Spezialisierung wird hierfür im Hintergrund
;; eine SharedRecordSeries mit SoA-Layout (Float-Puffer für mid und range) erstellt. ;; eine SharedRecordSeries mit SoA-Layout (Float-Puffer für mid und range) erstellt.
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 1.2us ;; Benchmark: 946ns
;; Benchmark-Repeat: 1634 ;; Benchmark-Repeat: 2116
;; Output: ["Alice" 101 :admin "Zürich" ["Alice" "Bob"] true] ;; Output: ["Alice" 101 :admin "Zürich" ["Alice" "Bob"] true]
; --------------------------------------------------------- ; ---------------------------------------------------------
+2
View File
@@ -1,3 +1,5 @@
;; Benchmark: 19.9us
;; Benchmark-Repeat: 110
(do (do
(repeat n 10 (print n) (repeat n 10 (print n)
) )
+2 -2
View File
@@ -1,6 +1,6 @@
;; Output: 26.7 ;; Output: 26.7
;; Benchmark: 1.4us ;; Benchmark: 890ns
;; Benchmark-Repeat: 1406 ;; Benchmark-Repeat: 2240
(do (do
(def my_ticks (series 100 {:price :float :volume :int :msg :text})) (def my_ticks (series 100 {:price :float :volume :int :msg :text}))
+1 -1
View File
@@ -2,7 +2,7 @@
;; 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: 314.2us ;; Benchmark: 314.2us
;; Benchmark-Repeat: 8 ;; Benchmark-Repeat: 8
+2 -1
View File
@@ -1,4 +1,5 @@
;; Benchmark: 2.0ms ;; Benchmark: 1.5ms
;; Benchmark-Repeat: 3
;; Output: "done" ;; Output: "done"
(do (do
(def count_down (fn [n] (def count_down (fn [n]
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 855ns ;; Benchmark: 513ns
;; Benchmark-Repeat: 2366 ;; Benchmark-Repeat: 3911
;; Output: ["Symbol:" "btc" "field:" :close "id:" "cls"] ;; Output: ["Symbol:" "btc" "field:" :close "id:" "cls"]
(do (do
(def p (fn [conf] (def p (fn [conf]
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 1.7us ;; Benchmark: 936ns
;; Benchmark-Repeat: 1175 ;; Benchmark-Repeat: 2134
;; 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
;; ;;