Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test out jump-table decoder approach #9

Closed
greglook opened this issue Mar 20, 2018 · 1 comment
Closed

Test out jump-table decoder approach #9

greglook opened this issue Mar 20, 2018 · 1 comment

Comments

@greglook
Copy link
Owner

greglook commented Mar 20, 2018

Given that many values are entirely determined by the first byte of each data item, the codec could take a more direct approach to decoding values by using a jump table instead of the normal branching logic. This would have 256 entries, which return hard-coded values where possible and dispatches to the more nuanced decoding functions elsewhere. Using a case would give constant-time decoding for all single-byte values.

See RFC 7049 Appendix B

@greglook
Copy link
Owner Author

Addressed in #11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant