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

asn1: OER-based copy for asn1c wrapper #219

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

v0-e
Copy link
Contributor

@v0-e v0-e commented Jan 30, 2024

May I suggest the use of OER to do the roundtrip-based copy of ASN.1 types?
Unless there are any concerns with the implementation/safety of asn1c's OER, we can consider it over the current BER/DER copy since it is much faster.

A benchmark of 1000000 roundrip encoding/decodings of a zero-initialized CAM with some fields set to 1 to pass the constraint checks:

OER Roundtrip in 3.370587 s   // (canonical)
BER Roundtrip in 14.393260 s  // der -> ber
PER Roundtrip in 3.833098 s   // (canonical unaligned)
JER Roundtrip in 10.260315 s  // (minified)
XER Roundtrip in 14.103931 s  // (canonical)

@riebl
Copy link
Owner

riebl commented Jan 30, 2024

Fine for me :-)

@riebl riebl merged commit f0a136a into riebl:master Jan 30, 2024
5 checks passed
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