keichi / binary-parser

A blazing-fast declarative parser builder for binary data
MIT License
864 stars 134 forks source link

Disable context variables by default #175

Closed keichi closed 2 years ago

keichi commented 2 years ago

This PR disables the context variables introduced recently (#166, #169, and #170) by default. The introduction of context variables degraded the parsing performance for multiple orders of magnitudes because it adds and deletes properties during parsing. Although context variables are useful, I decided to disable context variables by default since binary-parser's primary goal is high parsing performance.

Users will need to call .useContextVars() on the parser object to enable context variables.

Closes #173.