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