Users evaluating our ASN1C SDK frequently find they don't get the encoding or decoding performance they hoped for.  The libraries we provide for evaluation have less-than-optimal performance for two reasons: they are not optimized and they include license checking overhead. Customers who need to evaluate performance characteristics can request access to optimized libraries, but without doing that, what are some reasonable expectations?

We recently did some performance analysis to help a potential customer evaluate performance. The analysis was for decoding of LTE RRC messages using C++. We used ASN1C 7.4, the statically-linked ASN1C libraries, and Visual Studio 2019. Due to possible variations in specifications, data sets, and hardware, I don't report absolute measurements here, but rather relative measurements of elapsed wall clock time.

Non-optimized, limited (license-checked) library (baseline) 100%
Non-optimized (debug), unlimited (license-check free) library 72%
Optimized, limited (license-checked) library 47%
Optimized, unlimited (license-check free) library 20%
Optimized, unlimited (license-check free) library, with code generation changes (see below for details) <2% (8.5% of the time for the same library without the code generation changes)

In this test, we found that the optimized, unlimited library used roughly 20% of the time used by the non-optimized, limited library provided with the evaluation SDK (that's an 80% reduction in elapsed time).

In this particular case, we did some further experimentation to see what could be done with the generated code to get even better performance using the optimized, unlimited library. We found that by removing some generated diagnostics-related code and using dynamic arrays instead of linked lists, we achieved a tremendous further performance boost. (We generated code using the -dynamicArray option and compiled it with _COMPACT defined). By doing this, we found the time used was less than 2% of the baseline, and only 8.5% of the time used by the optimized, unlimited library.


Published

Category

ASN1C

Tags