Tracking issue of known performance issues #378
Labels
area/codec
Related to a new or existing ASN.1 codec.
good first issue
Good for newcomers
help wanted
Extra attention is needed
kind/enhancement
New feature or request
OER codec has been optimized fairly well at this point and some optimizations have been carried to other codecs as well.
However, there is some work to do in other codecs and they can take advantage of or note the added improvements during OER optimizations. Most of the possible improvements are related to the reduction of allocations.
BER/CER/DER
encode_buf
encoding function at the same time, so caller can pass existing bufferdecode_octet_string
method to return always slices instead of vectors and add constraint check at the same timeobject_identifier_as_bytes
method should take buffer as parameter and encode into that. This function is also used by other codecs.UPER/APER
Most of the following optimizations can be mimiced from the OER codec, with slight modifications since its completely octet-aligned.
encode_buf
encoding function at the same time, so caller can pass existing bufferdecode_octet_string
method, so it should be re-adjusteddecode_length
method seems to be very slow - needs some researchnom_bitvec
andBitVec
are sometimes very slow - conversions between bitvec/vec and general parsing should be benchmarked if there are improvements available by using different patternsOER
Unsafe improvements (may or may not added?)
get_unchecked_mut
in optional/extension presence tracking for setting array index, will grant around 5% performance for general logic when extensions and optional fields are presentErrors
Some errors might introduce allocation or other performance penalties if used with
format!
. Errors likely need some benchmarking too.The text was updated successfully, but these errors were encountered: