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.
In reply to Re: Optimizing binary file parser (pack/unpack)
by Corion
in thread Optimizing binary file parser (pack/unpack)
by pwagyi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |