def message
bend-lint-rules@0.2.0.0 · performance/bang_after_fork.bend:30
import bend-lint-rules@0.2.0.0/performance/bang_after_fork.bend as BangAfterFork
import Base
30
31
32def message(callee: String) -> String:
33 callee
34 ++ "! runs after a fork in the same evaluation (no IO step between them), so Bend runs it on the CPU pool, not on the GPU. GPU: measured 3.9 s for a numeric fork tree, against 0.55 s after the fix. CPU (`--gpu off`): no change. JS: no GPU, so no change. Confidence: high, as Bend's scheduler decides it. Put an IO step, such as `t : Nat <- IO.now()`, between the forks and this call, as Bend's slash boss demo does. If this call is short, so that the CPU pool runs it as fast, expect this finding."