Skip to content

Use lookup_value() to speed up MessageHeader.unpack(). - #447

Merged
adamshapiro0 merged 2 commits into
masterfrom
lookup-value
Oct 28, 2026
Merged

adamshapiro0 merged 2 commits into
masterfrom
lookup-value

Conversation

@adamshapiro0

@adamshapiro0 adamshapiro0 commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

  • Use lookup_value() to avoid the cost of enum call machinery

Fixes

  • Fixed non-numeric value failures with pytest 9.2

…k().

This skips the enum call machinery for every decoded header, which improves
performance.
@adamshapiro0
adamshapiro0 requested a review from bhers4 October 28, 2026 15:07
@adamshapiro0 adamshapiro0 self-assigned this Oct 28, 2026

@bhers4 bhers4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me!

@bhers4

bhers4 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Make sure to fix the failing python unit tests as well.

pytest 9.2 no longer accepts a non-numeric expected value with a relative
tolerance, and the expected P1 time is a Timestamp.
@adamshapiro0
adamshapiro0 merged commit 76a9026 into master Oct 28, 2026
27 checks passed
@adamshapiro0
adamshapiro0 deleted the lookup-value branch October 28, 2026 15:21
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