You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Thank you for this project! It seems to be the fastest ASN.1 implementation for Rust and is easy to use!
I don't want to report a bug but have a question regarding encoding and decoding of raw binary data with octet strings. I'm not familiar with ASN.1 and are probably holding it wrong. So this might be more a UPER related question than something asn1rs specific. Apologies :)
When I profile the performance of encoding and decoding data to unaligned PER, I see some unexpected slowdowns, in particular, writing the data field.
Here is a valgrind --tool=callgrind call graph of the encoding process
and here of the decode:
The majority of the time seems to be spent at write_octect_string -> bit_string_copy_bulked and read_octet_string -> bit_string_copy_bulked. Now the majority of my data is made up of binary blobs that I need to get in and out verbatim.
I simply encode and decode my data with
let mut writer = UperWriter::default();
writer.write(data)?;
let data = writer.into_bytes_vec();
// ...
let mut reader = UperReader::from(data);
let data = reader.read::<T>();
If I understand it correctly, shifting the data such that it fits the UPER correctly is causing that. Are there any tips of how to deal with that to not incur that cost? Thank you!
The text was updated successfully, but these errors were encountered:
Hello! Thank you for this project! It seems to be the fastest ASN.1 implementation for Rust and is easy to use!
I don't want to report a bug but have a question regarding encoding and decoding of raw binary data with octet strings. I'm not familiar with ASN.1 and are probably holding it wrong. So this might be more a UPER related question than something asn1rs specific. Apologies :)
I have a data type defined like
When I profile the performance of encoding and decoding data to unaligned PER, I see some unexpected slowdowns, in particular, writing the
data
field.Here is a
valgrind --tool=callgrind
call graph of the encoding processand here of the decode:
The majority of the time seems to be spent at
write_octect_string
->bit_string_copy_bulked
andread_octet_string
->bit_string_copy_bulked
. Now the majority of my data is made up of binary blobs that I need to get in and out verbatim.I simply encode and decode my data with
If I understand it correctly, shifting the data such that it fits the UPER correctly is causing that. Are there any tips of how to deal with that to not incur that cost? Thank you!
The text was updated successfully, but these errors were encountered: