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

For extended JSON, switch on first characters #2

Open
xdg opened this issue Mar 5, 2020 · 0 comments
Open

For extended JSON, switch on first characters #2

xdg opened this issue Mar 5, 2020 · 0 comments
Labels
performance Making things faster

Comments

@xdg
Copy link
Contributor

xdg commented Mar 5, 2020

Currently, the code switches on the length of an extended JSON key and then does a linear scan for key equality to dispatch. In most cases, the first letters are different (e.g. $code $date $type) and we could switch on the first letter after the $. That might be faster than chained if-else comparisons.

@xdg xdg added the performance Making things faster label Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Making things faster
Projects
None yet
Development

No branches or pull requests

1 participant