Tags: kaitai-io/kaitai_struct_python_runtime
Tags
read_bytes(): use previous implementation again for small reads For small reads, the new code that tries to avoid unnecessary reads is noticeably slower than the previous code that reads unconditionally. In the worst case (1-byte reads), the new code is 13 times as slow as the previous implementation. The potential memory/IO savings only become worth it for larger reads, where the performance difference disappears. Co-authored-by: Petr Pucil <[email protected]>