Profile before optimizing
A hot allocator frame often points to repeated temporary ownership rather than expensive business logic. Confirm the call path and workload first; then remove allocations at the narrowest responsible layer.
rust / LEVEL 4
THEORY / RETRIEVAL
A hot allocator frame often points to repeated temporary ownership rather than expensive business logic. Confirm the call path and workload first; then remove allocations at the narrowest responsible layer.
`String::with_capacity` can avoid growth reallocations when the final byte size is cheap to compute. It must not change separators, Unicode bytes or empty-input behavior, and an allocation test should tolerate implementation details outside the measured region.
CHECKPOINT
02 / PROFILING
Rewrite `join_tags` to produce identical comma-separated output with at most one allocation for non-empty input. Do not use `join`, `format!`, or per-tag owned Strings.
Runner is waiting for a submission.