def slower

bend-lint-rules@0.2.0.0 · performance/gpu_fit.bend:207

import bend-lint-rules@0.2.0.0/performance/gpu_fit.bend as GpuFit
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint

207def slower(callee: String, param: Lint.Param) -> String:
208  match param:
209    case Lint.Param{name, +ty}:
210      callee
211        ++ "! receives data ("
212        ++ name
213        ++ Bool.pick(String, String.is_empty(ty), "", ": " ++ ty)
214        ++ "), which a discrete GPU reads across PCIe, page by page. GPU: on discrete GPUs (CUDA), measured slower than `--gpu off` for Bend's slash boss draw (1.4x) and for portal-bend; with unified memory (Apple M-series), the GPU wins that draw. CPU (`--gpu off`): not measured. JS: no GPU, so no change. Confidence: medium, as it depends on the machine. Time the program with and without `--gpu off`. If the GPU wins, expect this finding."

Uses (5)

Used by (1)