From a1621710256ee658952e8ee051c33a78f3153a4d Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 4 Feb 2026 09:55:22 +0000 Subject: [PATCH] Add interpreted vs fused comparison test --- test_interpreted_vs_fused.sexp | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test_interpreted_vs_fused.sexp diff --git a/test_interpreted_vs_fused.sexp b/test_interpreted_vs_fused.sexp new file mode 100644 index 0000000..0a365bd --- /dev/null +++ b/test_interpreted_vs_fused.sexp @@ -0,0 +1,37 @@ +;; Test: Interpreted vs Fused Pipeline Comparison +;; +;; This simulates a typical effects pipeline using the INTERPRETED approach +;; (calling primitives one by one through Python). + +(stream "interpreted_pipeline_test" + :fps 30 + :width 1920 + :height 1080 + :seed 42 + + ;; Load primitives + (require-primitives "streaming_gpu") + (require-primitives "geometry_gpu") + (require-primitives "color_ops") + (require-primitives "image") + (require-primitives "math") + + ;; Frame pipeline - INTERPRETED approach (one primitive call at a time) + (frame + (let [;; Create base image + r (+ 0.5 (* 0.5 (math:sin (* t 1)))) + g (+ 0.5 (* 0.5 (math:sin (* t 1.3)))) + b (+ 0.5 (* 0.5 (math:sin (* t 1.7)))) + color [(* r 255) (* g 255) (* b 255)] + base (image:make-image 1920 1080 color) + + ;; Apply effects one by one (INTERPRETED - slow) + angle (* t 30) + rotated (geometry_gpu:rotate base angle) + + hued (color_ops:hue-shift rotated 30) + + brightness (+ 0.8 (* 0.4 (math:sin (* t 2)))) + bright (color_ops:brightness hued brightness)] + + bright)))