Add benchmark metadata to examples

This commit is contained in:
Michael Schimmel
2026-02-22 00:43:39 +01:00
parent e87f7232e6
commit 5790880002
10 changed files with 39 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
;; Benchmark: 666ns
;; Benchmark-Repeat: 2975
(do
;; 1. Provokation Stack-Gap (bei Optimization Level 2)
(def result
(fn []
(do
(def unused 10) ;; Wird entfernt, Slot 0 ist dann "leer"
(def used 42) ;; Bleibt auf Slot 1 -> Lücke!
used)))
;; 2. Provokation Inlining-Blockade
;; Diese Funktion wird nicht inlined, weil sie ein 'def' enthält
(def complex-add
(fn [a]
(do
(def b 100)
(+ a b))))
[(result) (complex-add 50)]
)