# Library Comparison — Parse + All Fields
```bash
cargo bench -p synta-bench --bench comparison --features bench-compare
```
(`library_comparison_fields` Criterion group)
This profile parses the certificate and then reads every named field: serial number, issuer
DN (`format_dn()`), subject DN (`format_dn()`), signature algorithm OID
(`identify_signature_algorithm()`), signature bytes, notBefore, notAfter, public key
algorithm OID (`identify_public_key_algorithm()`), public key bytes, and version.
## How Each Library Handles Fields
The key insight is how parse-only cost and field-access cost combine for each library:
- **synta**: parse-only is fast because Names are `RawDer` (no decode); field access triggers
`format_dn()` (~400 ns each) and `identify_*()` (5–6 ns, `&'static str` return).
Total parse+fields is dominated by the two `format_dn()` calls.
- **cryptography-x509**: parse-only records raw byte offsets for every field, so parse and
field-access costs nearly collapse — parse+fields (1.43 µs) is almost the same as
parse-only (1.45 µs). This is the deferred-everything architecture.
- **x509-parser and x509-cert**: eagerly decode everything at parse time, so field access is
a free struct read. Parse+fields ≈ parse-only for them too.
- **NSS**: formats DNs to C strings at parse time, so field access is also free. The cost
is entirely in the parse step.
## Traditional X.509 Certificates
| cert_00 (NoPolicies) | 1333.7 ns | 1386.7 ns | 1815.9 ns | 2990.6 ns | 7940.3 ns |
| cert_01 (SamePolicies-1) | 1348.8 ns | 1441.0 ns | 2033.4 ns | 3174.3 ns | 7963.8 ns |
| cert_02 (SamePolicies-2) | 1338.6 ns | 1440.1 ns | 2120.1 ns | 3205.6 ns | 8206.8 ns |
| cert_03 (anyPolicy) | 1362.4 ns | 1468.3 ns | 2006.2 ns | 3194.5 ns | 7902.4 ns |
| cert_04 (AnyPolicyEE) | 1232.9 ns | 1424.7 ns | 1968.6 ns | 3168.1 ns | 7913.1 ns |
| **Average** | **1323 ns** | **1432 ns** | **1989 ns** | **3147 ns** | **7985 ns** |
rust-openssl and ossl averaged **15.1 µs** and **15.8 µs** respectively.
The gap between synta (1.32 µs) and cryptography-x509 (1.43 µs) is tighter here than in
parse-only (3.0×) because synta's field access includes two `format_dn()` calls (~800 ns
combined) that cryptography-x509 does for effectively free (its offsets were computed at
parse time). Synta leads by ~8% overall.