binrw icon indicating copy to clipboard operation
binrw copied to clipboard

Add "how to optimize parsers" documentation

Open jam1garner opened this issue 2 years ago • 0 comments

Spinning off from #129, making users more aware of this is a good practice.

Most notable things to be included:

  1. how buffering can help perf
  2. how seeks can affect binrw's perf characteristics
  3. how Vec<u8> is specialized
  4. how per-field error handling can add overhead in pathological cases

Also to be considered:

  1. perf debugging tool recommendations (strace, flamegraph)

(If anyone else has additions as to parts of the performance characteristics found to be unintuitive please comment them below)

jam1garner avatar Jun 01 '22 20:06 jam1garner