One of the new features announced in the release of ASN1C v7.2 was improved C/C++ PER encode and decode performance. This blog post provides some details on the improvements.
We measured a number of different messages types, but two that stood out were the improvement in encoding and decoding unaligned PER messages for LTE RRC and DSRC - two commonly used specifications. For LTE, we encoded a sample of DL-DCCH-Message messages. For DSRC, a set of BasicSafetyMessage messages were used.
The time in milliseconds to decode and encode 100000 records between v71x and v72x is shown in the following charts:
The chart on the left shows decoding and on the right encoding. As can be seen, decoding performance for LTE RRC improved by over 100% while for DSRC, the gain was approximately 50%. Encoding performances gains were not as dramatic with improvements of 28% and 18% respectively.
So to what to attribute these gains? The main improvement was in doing calculations that were being done in the run-time to be done at compile time and thus generating simpler code for things such as constraint checking. Similar improvements were made in the generation of code specifically targeted as "unaligned PER" (or UPER as it is commonly known) through the use of the -uper command-line option. This resulted in the removal of code that checked for aligned or unaligned PER at run-time.
Finally, we introduced a new kind of simplified memory management called static memory blocks that contains some limitations on use but which is much faster because rather than having to carve up blocks, it simply always sequentially allocates going forward. Further details on this are available at the following URL:
https://www.obj-sys.com/docs/acv72/CCppHTML/ch08s04.html