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

Copy operation #174

Merged
merged 3 commits into from
Feb 4, 2024
Merged

Copy operation #174

merged 3 commits into from
Feb 4, 2024

Conversation

v0-e
Copy link

@v0-e v0-e commented Feb 2, 2024

Usually, if a user wants to copy an ASN.1 structure, the user first encodes the source structure and then decodes it into the destination structure. This works well, though is not really performant.

This PR introduces asn_copy() to speed up structure deep-copying without the encoding/decoding overhead.

A benchmark of copying a zero-initialized ETSI ITS CAM (definition) 1000000 times, with some fields set to 1 to pass constraint checks. Encoding/decoding roundtrip-based copy results are also shown.

Cloning CAM 1000000 times
Copy in 0.263973 s
COER in 3.683888 s
BER  in 14.686351 s
UPER in 3.921389 s
JERM in 10.551459 s
CXER in 14.745492 s

@mouse07410 mouse07410 merged commit 4cfcd4f into mouse07410:vlm_master Feb 4, 2024
1 check 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