Skip to content

trailofbits/python-asn1-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Python ASN.1 benchmarks

Benchmarks for the same ASN.1 structures encoded/decoded with cryptography, pyasn1, and asn1crypto.

The benchmark covers:

  • a small RSA private key sequence
  • a Doohickies sequence with primitive fields, object identifiers, and a set of generalized times

The decode benchmarks are named decode_access_one_field because the timed function decodes the DER input and accesses one child field. This is intentional: asn1crypto lazily loads child fields, so timing only load() would measure construction of the lazy wrapper rather than comparable field access.

The asn1crypto encode benchmark uses normal cached dump(), not dump(force=True).

Benchmark

Run from this directory with uv. Dependencies are declared inline in the test file:

uv run test_asn1_benchmark.py --benchmark-sort=mean

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages