Files
RustAst/examples/record_optimizations.myc
T

13 lines
288 B
Plaintext

;; Benchmark: 882.7us
;; Benchmark-Repeat: 4
;; Tests the effect of record inlining and field lookup optimization
;; Output: 10000
(do
(def config {:start 0 :limit 10000 :step 2})
(def x (.start config))
(while (< x (.limit config))
(assign x (+ x (.step config))))
x
)