in reply to Optimizing binary file parser (pack/unpack)
Depending on whether you actually need to unpack each record or not, you can maybe hardcode the offsets to reject rows before actually unpacking them. index can quickly look at a position in a string without needing pack or unpack.
Depending on how you unpack things, it might be quicker to build one large unpack template instead of unpacking items in a loop.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Optimizing binary file parser (pack/unpack)
by pwagyi (Monk) on Oct 03, 2017 at 08:16 UTC |