I'm timing try parseLine(line) against parseLine(line) catch unreachable over ~2M generated ts,level,bytes lines, summing the bytes. Built with -Doptimize=ReleaseFast.
The try run reports a few hundred microseconds and prints an error name instead of a total. The catch unreachable run takes tens of ms, and its total is different. ReleaseSafe and Debug panic on the second one. I added a corrupt line every 5000 lines to "make it realistic". With --bad-every 0 things look saner, but I don't get why it matters this much.
The two loops:
const e = try parse.parseLine(line);
total += e.bytes;
// vs
const e = parse.parseLine(line) catch unreachable;
total += e.bytes;
My guesses were error return traces or inlining. I haven't looked at the assembly yet. Input generation is already outside the timer. (splitScalar showed up around 0.12, I think, nvm if that's off.)
So what is this actually measuring? Thanks for any pointers.