Files
RustAst/examples/record_specialization_test.myc
T
Michael Schimmel a18642fd7b Update example output comments
Add `Output` comments to the example files to reflect the actual output
of the programs. This helps with verifying correctness and understanding
example behavior.
2026-03-02 23:46:44 +01:00

26 lines
654 B
Plaintext

;; Benchmark: 1.5us
;; Benchmark-Repeat: 1367
;; 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.
;; Output: PipelineNode[last: Some({:mid 101.35623617501585, :range 0.9314056584827455})]
(do
(def ohlc_stream (create-random-ohlc 42 10))
;; Pipe die einen Record erzeugt
(def indicator
(pipe [ohlc_stream]
(fn [ohlc]
{
:mid (/ (+ (.high ohlc) (.low ohlc)) 2.0)
:range (- (.high ohlc) (.low ohlc))
}
)
)
)
indicator
)