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

Optimize encoding of positive bigints #637

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

turbolent
Copy link
Member

Description

The CBOR library's bigint encoding function always creates a copy of the encoded value: https://github.com/fxamacker/cbor/blob/ee962ff86de23bc964f19d8e4a1a23171b05e58b/encode.go#L1159.
This is not necessary for the case where the value is positive, only when it is negative.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent merged commit 2944219 into master Mar 2, 2021
@turbolent turbolent deleted the bastian/optimize-positive-bigint-encoding branch March 2, 2021 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants