Update benchmark results in examples
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 1.8us
|
||||
;; Benchmark-Repeat: 1122
|
||||
;; Benchmark: 1.2us
|
||||
;; Benchmark-Repeat: 1658
|
||||
;; Output: 120
|
||||
(do
|
||||
(def factorial (fn [n acc]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
;; Closure Scope Test
|
||||
;; Benchmark: 416ns
|
||||
;; Benchmark-Repeat: 4848
|
||||
;; Benchmark: 55ns
|
||||
;; Benchmark-Repeat: 36184
|
||||
;; Output: 15
|
||||
(do
|
||||
(def make-adder (fn [x]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;; Benchmark: 89ns
|
||||
;; Benchmark-Repeat: 23053
|
||||
;; Benchmark: 56ns
|
||||
;; Benchmark-Repeat: 36321
|
||||
;; Output: 5
|
||||
(((fn [x] (fn [] x)) 5))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 89ns
|
||||
;; Benchmark-Repeat: 23311
|
||||
;; Benchmark: 55ns
|
||||
;; Benchmark-Repeat: 36269
|
||||
;; Output: 5
|
||||
(do
|
||||
(def f (fn [x] (fn [] x)))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 87ns
|
||||
;; Benchmark-Repeat: 23196
|
||||
;; Benchmark: 55ns
|
||||
;; Benchmark-Repeat: 36160
|
||||
;; Output: 42
|
||||
(do
|
||||
(def f (fn [a] (fn [b] (fn [c] (+ a (+ b c))))))
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
;; Complex Data Structure Test
|
||||
;; Benchmark: 32.9us
|
||||
;; Benchmark-Repeat: 61
|
||||
;; Benchmark: 33.5us
|
||||
;; Benchmark-Repeat: 62
|
||||
;; Output: {:name "Fibonacci", :input 10, :output 55}
|
||||
(do
|
||||
(def fib (fn [n]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 300ns
|
||||
;; Benchmark-Repeat: 6698
|
||||
;; Benchmark: 226ns
|
||||
;; Benchmark-Repeat: 8861
|
||||
;; examples/def_local_inlining.myc
|
||||
;; Demonstrates potential for DefLocal-Inlining (Phase 2.5)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 773ns
|
||||
;; Benchmark-Repeat: 2598
|
||||
;; Benchmark: 651ns
|
||||
;; Benchmark-Repeat: 3012
|
||||
;; Comprehensive Destructuring Test
|
||||
;; Covers: Nested tuples, mixed params, dynamic passing
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 85ns
|
||||
;; Benchmark-Repeat: 23630
|
||||
;; Benchmark: 55ns
|
||||
;; Benchmark-Repeat: 35723
|
||||
;; Output: 36
|
||||
(do
|
||||
;; Excessive capture test
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
;; Fibonacci Recursive
|
||||
;; Benchmark: 32.8us
|
||||
;; Benchmark-Repeat: 62
|
||||
;; Benchmark: 33.3us
|
||||
;; Benchmark-Repeat: 63
|
||||
;; Output: 55
|
||||
(do
|
||||
(def fib (fn [n]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;; Benchmark: 87ns
|
||||
;; Benchmark-Repeat: 23361
|
||||
;; Benchmark: 55ns
|
||||
;; Benchmark-Repeat: 35210
|
||||
;; Output: 30
|
||||
(+ 10 20)
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
;; Higher-Order Function Example
|
||||
;; Benchmark: 86ns
|
||||
;; Benchmark-Repeat: 23023
|
||||
;; Benchmark: 56ns
|
||||
;; Benchmark-Repeat: 36342
|
||||
;; Output: 25
|
||||
(do
|
||||
(def apply (fn [f x] (f x)))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 88ns
|
||||
;; Benchmark-Repeat: 22522
|
||||
;; Benchmark: 73ns
|
||||
;; Benchmark-Repeat: 30580
|
||||
;; Financial DSL Macro example
|
||||
;; Demonstrates generating complex records from simple parameters.
|
||||
;; Output: {:price 100, :size 2, :total 200}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 246ns
|
||||
;; Benchmark-Repeat: 8261
|
||||
;; Benchmark: 176ns
|
||||
;; Benchmark-Repeat: 11632
|
||||
;; Output: 5
|
||||
(do
|
||||
(def y 1)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
;; Benchmark: 55ns
|
||||
;; Benchmark-Repeat: 35990
|
||||
;; Output: 42
|
||||
(do
|
||||
(macro t [x] `(fn [~x] ~x))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 194ns
|
||||
;; Benchmark-Repeat: 10337
|
||||
;; Benchmark: 113ns
|
||||
;; Benchmark-Repeat: 19089
|
||||
;; Nested Macro and Arithmetic example
|
||||
;; Output: 81
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 195ns
|
||||
;; Benchmark-Repeat: 10279
|
||||
;; Benchmark: 136ns
|
||||
;; Benchmark-Repeat: 14587
|
||||
;; Macro Splicing example
|
||||
;; Demonstrates unrolling a list into another list.
|
||||
;; Output: [0 1 2 3 4]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 87ns
|
||||
;; Benchmark-Repeat: 23129
|
||||
;; Benchmark: 55ns
|
||||
;; Benchmark-Repeat: 36062
|
||||
;; Classic "unless" macro example
|
||||
;; Demonstrates simple template substitution.
|
||||
;; Output: 42
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 1.4us
|
||||
;; Benchmark-Repeat: 1473
|
||||
;; Benchmark: 1.2us
|
||||
;; Benchmark-Repeat: 1731
|
||||
;; Output: [150 130 "Insufficient funds" 130]
|
||||
|
||||
; ---------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 86ns
|
||||
;; Benchmark-Repeat: 23328
|
||||
;; Benchmark: 55ns
|
||||
;; Benchmark-Repeat: 36353
|
||||
;; Output: 13
|
||||
(do
|
||||
(macro wrap [f] `(fn [x] (~f x)))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 87ns
|
||||
;; Benchmark-Repeat: 23072
|
||||
;; Benchmark: 68ns
|
||||
;; Benchmark-Repeat: 36112
|
||||
;; Output: 31.41592653589793
|
||||
(do
|
||||
(def area (fn [x] (* PI x)))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 167ns
|
||||
;; Benchmark-Repeat: 12120
|
||||
;; Benchmark: 102ns
|
||||
;; Benchmark-Repeat: 20685
|
||||
;; Output: [42 150]
|
||||
(do
|
||||
;; 1. Provokation Stack-Gap (bei Optimization Level 2)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 2.1us
|
||||
;; Benchmark-Repeat: 921
|
||||
;; Benchmark: 1.4us
|
||||
;; Benchmark-Repeat: 1423
|
||||
;; Output: <StreamNode>
|
||||
|
||||
(do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 2.3us
|
||||
;; Benchmark-Repeat: 870
|
||||
;; Benchmark: 2.1us
|
||||
;; Benchmark-Repeat: 966
|
||||
;; Output: <StreamNode>
|
||||
|
||||
(do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 1.0ms
|
||||
;; Benchmark-Repeat: 3
|
||||
;; Benchmark: 882.7us
|
||||
;; Benchmark-Repeat: 4
|
||||
;; Tests the effect of record inlining and field lookup optimization
|
||||
;; Output: 10000
|
||||
(do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 1.1us
|
||||
;; Benchmark-Repeat: 1895
|
||||
;; Benchmark: 834ns
|
||||
;; Benchmark-Repeat: 2387
|
||||
;; Test Record SoA specialization in Pipelines
|
||||
;; Dank der neuen Spezialisierung wird hierfür im Hintergrund
|
||||
;; eine SharedRecordSeries mit SoA-Layout (Float-Puffer für mid und range) erstellt.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 1.2us
|
||||
;; Benchmark-Repeat: 1634
|
||||
;; Benchmark: 946ns
|
||||
;; Benchmark-Repeat: 2116
|
||||
;; Output: ["Alice" 101 :admin "Zürich" ["Alice" "Bob"] true]
|
||||
|
||||
; ---------------------------------------------------------
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
;; Benchmark: 19.9us
|
||||
;; Benchmark-Repeat: 110
|
||||
(do
|
||||
(repeat n 10 (print n)
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
;; Output: 26.7
|
||||
;; Benchmark: 1.4us
|
||||
;; Benchmark-Repeat: 1406
|
||||
;; Benchmark: 890ns
|
||||
;; Benchmark-Repeat: 2240
|
||||
(do
|
||||
(def my_ticks (series 100 {:price :float :volume :int :msg :text}))
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
;; heavily recursive, benefits significantly from specialization of integer arithmetic
|
||||
;; and direct function calls (skipping dynamic dispatch).
|
||||
;; Output: 5
|
||||
|
||||
|
||||
;; Benchmark: 314.2us
|
||||
;; Benchmark-Repeat: 8
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
;; Benchmark: 2.0ms
|
||||
;; Benchmark: 1.5ms
|
||||
;; Benchmark-Repeat: 3
|
||||
;; Output: "done"
|
||||
(do
|
||||
(def count_down (fn [n]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 855ns
|
||||
;; Benchmark-Repeat: 2366
|
||||
;; Benchmark: 513ns
|
||||
;; Benchmark-Repeat: 3911
|
||||
;; Output: ["Symbol:" "btc" "field:" :close "id:" "cls"]
|
||||
(do
|
||||
(def p (fn [conf]
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
;; Benchmark: 1.7us
|
||||
;; Benchmark-Repeat: 1175
|
||||
;; Benchmark: 936ns
|
||||
;; Benchmark-Repeat: 2134
|
||||
;; Demonstration of N-dimensional Tuples, Vectors, and Matrices
|
||||
;; Based on docs/Tupel 1.md
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user