Skip to content

Templatize NDTPPayloadBroadband#6

Merged
polymerizedsage merged 9 commits intomainfrom
sage/optimize-tests
Jan 8, 2025
Merged

Templatize NDTPPayloadBroadband#6
polymerizedsage merged 9 commits intomainfrom
sage/optimize-tests

Conversation

@polymerizedsage
Copy link
Copy Markdown
Contributor

The underlying representation of channel data in the NDTPPayloadBroadband struct is currently a vector of uint64s. This is nice for flexible data widths, but few use cases (if any) will ever need 64 bits of sample precision. Changing the struct to a template allows for a smaller data type (namely 16-bit ints) to be used. This also means that the struct can be constructed without copying all of the sample data into a new vector, significantly improving construction time.

My primary motivation for this change is improving performance of this data type without disrupting other library consumers. However the same performance bump could be gained by just universally agreeing to support bit widths only up to 16 bits. 64 bits is frankly kind of over the top.

The NDTPPayloadBroadband type name is preserved as using 64-bit ints so not to break other library users.

@antoniaelsen
Copy link
Copy Markdown
Contributor

I'm fine with updating NDTPPayloadBroadband in synapse-cpp, IMO the time would be now and we can uprev versions. Same with standardizing to 16bit.

Copy link
Copy Markdown
Contributor

@antoniaelsen antoniaelsen left a comment

Choose a reason for hiding this comment

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

tests

@antoniaelsen
Copy link
Copy Markdown
Contributor

lgtm, just needs those tests fixed

@polymerizedsage polymerizedsage merged commit 5e0f16d into main Jan 8, 2025
@polymerizedsage polymerizedsage deleted the sage/optimize-tests branch January 8, 2025 22:01
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