Skip to content

Decode bridge documents without JSONDecoder boxing - #11

Merged
arpan404 merged 1 commit into
mainfrom
perf/ios-bridge-decoder
Nov 1, 2026
Merged

arpan404 merged 1 commit into
mainfrom
perf/ios-bridge-decoder

Conversation

@arpan404

Copy link
Copy Markdown
Owner

Routes MarkitDocument through a manual NSDictionary-based decoder (pre-bridged keys, kind-specialized reads, CFBoolean-exact bools). Measured release on Mac host: decode -68%, end-to-end -44-64% on span-dense docs; naive [String:Any] only -5%. New BridgeDecodeTests assert field-by-field equality vs JSONDecoder over all 28 span kinds, bool/int-zero separation, and malformed rejection. Swift 17/17 green in debug and release. Other Decodable types keep the generic path; bridge bytes and C ABI untouched.

BridgeDecoder keeps property lists as NSDictionary, uses pre-bridged
keys and kind-specialized reads: decode ~68% faster, end-to-end
~44-64% on span-dense docs. Differential tests pin it to Decodable
field-by-field over every span kind.

Co-Authored-By: ace <bot@acehq.dev>
@arpan404
arpan404 merged commit 401120a into main Nov 1, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant