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)
|Non-optimized (debug), unlimited (license-check free) library
|Optimized, limited (license-checked) library
|Optimized, unlimited (license-check free) library
|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.
We are pleased to announce a new major release of ASN1C for 2020, version 7.4.
The main new feature in this release is the capability to generate Python encoders and decoders. Currently supported is generation of code for the BER/DER and JSON (JER) encoding rules. The BER support includes options to generate forward encoders using indefinite lengths and also includes support for parsing and formatting 3GPP TS 32.297 headers as used in standard 3GPP CDR formats.
The new capability provides for generation of 100% Python code, not wrappers around platform-specific DLL’s or shared object files.
We plan to add support for PER, OER, and XER later this year.
In addition to Python, other features in the new release include:
- Support for 5G ASN.1-based protocols as well as 5G NAS (3GPP TS 24.501)
- Support for Visual Studio 2019 in the Windows versions
- The capability to use ASN1C project files created with the GUI from the command-line
Further information can be found in the documentation on the product support page.
A new ASN1C Linux 64-bit evaluation kit is now available for ASN1C version 7.3.3 to address problems reported by users with the current package. One problem reported was when executing the ASN1C binary, an error similar to this may be displayed: “version ‘GLIBC_2.12’ not found”. A second problem was in linking with libraries in the package in which an error to the effect of “unrecognized relocation” or “bad value” would be reported. This is because our binaries are now built with a newer version of glibc and ld (such as, currently, glibc 2.23 and ld/binutils 2.26). Older systems that have glibc versions such as 2.12 will fail to build with these libraries.
This new package contains executable files and libraries built with an older version of glibc.
The description of the existing package on our download page has been changed to:
- Linux Ubuntu 16.04 (x64) 64-bit, glibc 2.23
The new package is
- Linux Centos 6.5 (x64) 64-bit, glibc 2.12, no GUI
Note that in both of these cases, even though we have listed the specific Linux distribution used, the packages should work on any reasonably up-to-date Linux distributions such as SUSE, Fedora, Debian, etc. The only factor in determining which one to use would be the version of glibc.
Also note that the package that uses the older glibc does not contain the ASN1C GUI as it required the newer glibc version be available.
To check which version of glibc your system is currently using, enter the command “ldd –version”. This will print the version of ldd and glibc, with output similar to the following:
An updated version of our ASN1C Eclipse Plug-in is now available for Eclipse versions 4.6 (Neon) and higher.
A previous version of this plug-in had been available for Eclipse 3.x. However, once Eclipse modified the way in which it installs and supports plug-ins, this version ceased to function and there was a significant delay in getting it up-to-date with newer Eclipse versions. This upgrade is now complete.
Capabilities of this plug-in include:
- ASN.1 editing and syntax checking
- Code generation of C/C++, Java, and C# languages from ASN.1
Click on the “Eclipse Plugin” tab near the bottom of our ASN1C product page for more information and installation instructions.
You may or not be aware that ASN1C includes a Visual Studio Wizard that you can use from Visual Studio to build a library from one or more ASN.1 files. If you have at least ASN1C v732, the wizard is present and usable.
The files for the wizard are in the vswizard folder of your ASN1C installation. There are three files here that are the components of the wizard: ASN1CWizard.ico, ASN1CWizard.vsdir, and ASN1CWizard.vsz. There is also a README.txt file here that provides instructions for configuring and installing the wizard. One of the steps is to modify the .vsz file, and note in particular the instructions to remove the comment-like lines that are at the top. In ASN1C v7.4, which will likely be released in January, this .vsz file will be generated during the installation, and there will no longer be a need to edit it.
Once the files for the wizard are correct and in place, you can use Visual Studio to create a new project just like you normally would, but now you can choose ASN1C as the project type. The wizard will invoke the ASN1C GUI, with some of the irrelevant options disabled. You can use the GUI to choose the ASN.1 files and define how you want the code to be generated for your library. Then you click on the Compile button to generate the code and a Visual Studio project file. Once you exit the GUI, the project file will be loaded into Visual Studio.