I thought about the efficiency issue, but I guess it boils down to personal choice. With the guarded print you don't get to see a
-1:\n should the pattern happen to match on the first line, and really that single test does very little to performance. We could pull out
Benchmark here but I suspect the difference would be within measurement jitter (how is this exactly called in English?) for any less than a few hundred thousand lines.
Makeshifts last the longest.