High-performance ASN.1 compiler

  • Authors:
  • Michael Sample;Gerald Neufeld

  • Affiliations:
  • Department of Computer Science, University of British Columbia, Vancouver, B.C. V6T 1Z2, Canada;Department of Computer Science, University of British Columbia, Vancouver, B.C. V6T 1Z2, Canada

  • Venue:
  • Computer Communications
  • Year:
  • 1994

Quantified Score

Hi-index 0.24

Visualization

Abstract

The tasks of encoding and decoding complex data structures for network transmission are more expensive in terms of processor time and memory usage than any other components of the protocol stack. We examined the performance of four network data representation standards: ASN.1 Basic Encoding Rules (BER) and Packed Encoding Rules (PER). We also compare our implementations for BER and PER against the Sun Microsystem's External Data Representation (XDR) and HP/Apollo's Network Data Representation (NDR). To help examine implementation issues, we designed the snacc ASN.1 compiler that produces compile-based (C and C++) and table-based encoders and decoders as well as type tables. The implementation issues investigated include compiled versus table-based encoding and decoding, implementation language (C/C++), buffering techniques and memory management. We found that the areas crucial to efficient encoder and decoder implementations are memory management, buffer management and the overall simplicity of the encoding rules. Table-based encoders and decoders typically have considerably smaller code size but perform less efficiently than their compiled counterparts. In contrast to popular belief, it is possible to implement ASN.1 BER and PER encoders and decoders that perform as well as their NDR and XDR counterparts.