0ed52a811d
This commit updates the benchmark metadata in several example files. The benchmark runs and repeat counts have been slightly adjusted due to optimizations or minor variations in execution.
26 lines
592 B
Plaintext
26 lines
592 B
Plaintext
;; Benchmark: 363ns
|
|
;; Benchmark-Repeat: 5561
|
|
;; examples/def_local_inlining.myc
|
|
;; Demonstrates potential for DefLocal-Inlining (Phase 2.5)
|
|
|
|
(fn []
|
|
(do
|
|
;; 1. Simple constant propagation
|
|
(def x 10)
|
|
(def y 20)
|
|
|
|
;; Expected optimization: (+ 10 20) -> 30
|
|
(def z (+ x y))
|
|
|
|
;; 2. Tracking assignments (Assign-Safety)
|
|
;; Inlining must be careful with 'assign'.
|
|
(def result
|
|
(do
|
|
(def a 100)
|
|
(assign a 200)
|
|
;; Expected optimization: 200
|
|
a))
|
|
|
|
;; 3. Return a tuple of optimized results
|
|
[z result]))
|