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

Improve compose traverse perf #380

Merged
merged 5 commits into from
Sep 1, 2024

Conversation

wismill
Copy link
Member

@wismill wismill commented Sep 25, 2023

This is a follow-up of #367 (see the motivation). The aim is to explore better implementations of the compose traversal API, in particular xkb_compose_table_iterator_next.

Currently it is in the state of #367 before removing alternative implementation and squashing. It will need to be rebased once #367 is merged. Done

I kept the 2 implementations (see the benchmarks) in an intermediate commit for testing.

TODO:

  • Squash commit marked as “SQUASH ME”

@wismill wismill added compose Indicates a need for improvements or additions to Compose handling performance labels Sep 25, 2023
@wismill wismill force-pushed the compose/traverse-perf branch 2 times, most recently from 787f16f to 1bd744d Compare November 2, 2023 09:55
@wismill wismill marked this pull request as ready for review November 2, 2023 09:58
@wismill wismill requested review from bluetech and whot November 2, 2023 09:58
@wismill wismill force-pushed the compose/traverse-perf branch 2 times, most recently from 279ad2f to b59bdc9 Compare July 8, 2024 08:20
@wismill wismill force-pushed the compose/traverse-perf branch 2 times, most recently from 80679a0 to a26a5a2 Compare July 30, 2024 13:04
@wismill
Copy link
Member Author

wismill commented Jul 30, 2024

Rebased, added quickcheck test against foreach implementation.

@wismill wismill added this to the 1.8.0 milestone Jul 30, 2024
@wismill wismill force-pushed the compose/traverse-perf branch 2 times, most recently from c9b6670 to 454f65e Compare September 1, 2024 09:11
@wismill
Copy link
Member Author

wismill commented Sep 1, 2024

Rebased, improved comments and added roundtrip test. Will merge soon.

@wismill wismill force-pushed the compose/traverse-perf branch from 454f65e to 72e18d4 Compare September 1, 2024 09:23
- Move `print_compose_table_entry` to own file and add a `file`
  argument to select output.
- Add `xkb_compose_table_dump` to dump a Compose table.

This change is needed in order to share the feature “dump a Compose
table” between tests and tools.
Test against the `foreach` reference implementation:
- Suffle compose file lines randomly;
- Compare traversal entry by entry.

The `foreach` Compose traversal implementation is based on Ran’s work:
bluetech@f7f3c3c
This allow us to compare the iterator API to the fastest implementation,
`foreach`.
New implementation without explicit direction
@wismill wismill force-pushed the compose/traverse-perf branch from 72e18d4 to 582d68b Compare September 1, 2024 10:45
@wismill wismill merged commit 5e539bf into xkbcommon:master Sep 1, 2024
4 checks passed
@wismill wismill deleted the compose/traverse-perf branch September 1, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compose Indicates a need for improvements or additions to Compose handling performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant