def message

bend-lint-rules@0.2.0.0 · performance/unused_result.bend:26

import bend-lint-rules@0.2.0.0/performance/unused_result.bend as UnusedResult
import Base

26# Functions
27# =========
28def message(+name: String, loop: String) -> String:
29  name
30    ++ " is never used, but Bend computes every value it binds: "
31    ++ name
32    ++ " is built, then walked to be freed, on every step of "
33    ++ loop
34    ++ ". All lanes. Measured on the CPU, in llama.bend: not building the activations that its generation loop never used made each token 19% to 25% faster. Confidence: medium, as the cost grows with the value. Have the code that makes "
35    ++ name
36    ++ " skip it, such as a variant that does not build it. If it is small, expect this finding."

Uses (2)

Used by (1)