{'fraction_non_alphanumeric': 0.024151811385853938, 'fraction_numerical': 0.008050603795284647, 'mean_word_length': 4.958904109589041, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Comparing the Performance of Abstract Syntax Notation One (ASN.1) vs eXtensible Markup Language (XML)

We describe a series of tests that have been carried out to measure the performance differences between eXtensible Markup Language (XML) and Abstract Syntax Notation One (ASN.1) with its Basic Encoding Rules (BER), for signed and unsigned attribute certificates. Our findings demonstrate that, as might be expected, XML encoded attribute certificates are approximately an order of magnitude greater in size than ASN.1 BER ones. The XML encoding process is initially faster than ASN.1 BER for small unsigned data structures, but the time taken increases more rapidly so that for large complex data structures ASN.1 BER is quicker than XML. However, ASN.1 BER decoding of unsigned data is always two to three times faster than XML decoding, regardless of data size. When digital signing is taken into account, ASN.1 BER is faster than XML for all data structures, and its performance advantage increases with data complexity. When validating signed data structures, ASN.1 starts at over 3 times faster than XML for simple attribute certificates, rising to an order of magnitude faster for complex attribute certificates. When transmission time is taken into account ASN.1 BER outperforms XML in all of our scenarios. For small comparable unsigned data objects across broadband connections, the performance difference is a factor of 5 greater, and for large signed data objects across 64k lines the difference is approximately an order of magnitude better. We conclude that where performance is required to be optimal there are better choices of data formatting and digital signing than XML, and one of those choices is ASN.1 with its BER.