dishmaker

Results 81 comments of dishmaker

Nice. `IsConstructed` trait actually found a bug by itself. ```asn1 NegHints ::= SEQUENCE { hintName[0] GeneralString OPTIONAL, ``` `AnyRef` can be primitive or constructed, but `GeneralString` is strictly primitive.

Depends on: - #1689 Breaks test in `x509-cert/tests/pkix_extensions.rs` https://github.com/RustCrypto/formats/pull/1545/files#diff-adb3729d388b26047202e8a442d9fe78eb2a2857d61adb6ad87bffc57f65aa51L1195

In benchmarks `x509-cert` Decode is the slowest (but does Encode very fast). Figure: `x509-cert` slowest (red), `cryptography-x509` fastest https://bencher.dev/perf/rasn/plots Now there is opportunity to use `alloc::Cow`, as Tony refactored Ref...

Benchmark code: https://github.com/librasn/rasn/blob/0a65d9a5699037ec19a706ce1f776ecc87d94b90/benches/criterion.rs#L42-L46 pyca `cryptography-x509`: https://github.com/pyca/cryptography/blob/d20fcd0b439c6140772413aae589e3c617b39ac1/src/rust/cryptography-x509/src/certificate.rs#L40

Having alloc and ref type aliases would have an obvious flaw of not supporting half-owned, half-ref certificates. On the other hand, `Cow` cert would be useful for editing ref-parsed cert...

I'm afraid creating newtype `OctetStringCow` would be easier in `x509-cert`. I tried implementing `Encode`/`Decode` for `Cow` here: - https://github.com/RustCrypto/formats/pull/2054

The only deadlock I experienced in Rust was this one. `par_iter` + sync channel `.send` + `par_iter` is evil.

rustc 1.88.0 ``` cargo llvm-lines --release | head -n 3 Before: 66746 After: 63391 ``` 5% improvement

toml compiles faster by 3%   | after (DisplayJoined) | before (main) -- | -- | -- average [s] | 2.498 | 2.576 stdev [s] | 0.020 | 0.017 [Spoiler] script...