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

Decide on best sort-order #1

Open
3 tasks
urob opened this issue Dec 9, 2024 · 0 comments
Open
3 tasks

Decide on best sort-order #1

urob opened this issue Dec 9, 2024 · 0 comments

Comments

@urob
Copy link
Owner

urob commented Dec 9, 2024

For now sequences are looked up in the order provided by the user. According to my testing, this beats the the original PR's performance, mainly due to how we filter down and track the state of candidate sequences between key presses.

Nevertheless, it may be worthwhile creating a sorted pointer array in data during initialization.

  • Sort by sequence length for small performance boost
  • Reverse-sort identical keycodes by modifiers so if both LS(A) and A are specified we first test for the former
  • Sort by usage page and keycodes and abort lookup if we exceed the current press? This speeds up termination on failed lookups but is otherwise somewhat arbitrary
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