Optimize memory for error case

New option SimpleErrorMessages that avoids allocation in the error path. It's off by default to preserve backwards compatibility.

Added benchmark BenchmarkBigParseAnyErrors that takes the big set of test cases, and injects errors to make them fail at pseudo-random places.

This optimization speeds up the error path runtime by 4x and reduces error path allocation bytes by 13x!
This commit is contained in:
Klondike Dragon
2023-12-16 23:28:15 -07:00
parent d2e1443c4d
commit fbf07cc274
4 changed files with 330 additions and 215 deletions

File diff suppressed because it is too large Load Diff