Skip to content

Improve jtag speed#126

Open
BenediktO wants to merge 2 commits intosigrokproject:masterfrom
BenediktO:improve_jtag_speed
Open

Improve jtag speed#126
BenediktO wants to merge 2 commits intosigrokproject:masterfrom
BenediktO:improve_jtag_speed

Conversation

@BenediktO
Copy link
Copy Markdown
Contributor

This small PR improves the speed of the JTAG decoding.

It is accomplished by removing an if-elsif-chain and refactoring its logic into a dictionary. This gave roughly 30% speedup when using sigrok-cli on a 20s sample I captured.
In addition I decode the bits only once and use it to generate the binary and hex representation.
All tests still pass.

Copy link
Copy Markdown

@Krakonos Krakonos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code decoding code cleanup is worth it and while I don't have any JTAG samples long enough to see the improvement, I don't see any degradation either. @BenediktO If possible, could you contribute a sample that takes a bit of time to decode for a benchmark?

@abraxa I recommend this PR for merging.

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

Successfully merging this pull request may close these issues.

2 participants