DeadAccumulator.message: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/dead_accumulator.bend as DeadAccumulator Lines 24-32 of bend-lint-rules@0.2.0.0/performance/dead_accumulator.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/dead_accumulator.bend&start_line=24&end_line=32 import Base # Functions # ========= def message(+name: String, loop: String) -> String: name ++ " only grows: " ++ loop ++ " passes it to itself with something added, and nothing reads it, so Bend builds it on every step and frees it at the end. All lanes. Measured on the CPU, in bend-ml's BPE encode, where such a list, built per word, was half of the time: 26.1 s to tokenize 19 KB of text, against 11.5 s after the fix. Confidence: medium, as the gain is what building it costs. Erase it, with `-" ++ name ++ "`: the checker keeps it for proofs, and the compiler deletes it; or remove it. If it gets only a few small items, expect this finding." Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append