Ecosystem

Benchmarks

Measured, not asserted. The harness generates a deterministic corpus, renders the same logical data to every format, and measures bytes, gzip, tokens across four tokenizer families, throughput and round-trip fidelity. One command reproduces everything.

Reproducible · seeded corpus 4 tokenizer families github.com/icformat/icf-benchmarks

Headlines (1,000 records; compact JSON = 100%, lower is better)

Nested master/detail records (invoices — where flat formats can't compete)

FormatBytesTokens (o200k)Tokens (cl100k)Tokens (Llama 3)Tokens (Claude legacy)Lossless round-trip
ICF52%78%77%77%72%yes
JSON (compact)100%100%100%100%100%yes
JSON (pretty)163%163%163%163%162%yes
YAML116%127%125%125%122%yes
XML136%142%144%144%142%no*

Flat records (students — CSV's home turf)

FormatBytesTokens (o200k)Tokens (Claude legacy)Handles nesting
ICF55%72%68%yes
JSON (compact)100%100%100%yes
YAML97%118%107%yes
CSV48%62%67%no

In short: ICF carries hierarchical data at roughly half the bytes of compact JSON and 21–32% fewer tokens (tokenizer-dependent), while staying lossless — close to CSV's compactness without giving up nesting. After gzip the byte differences shrink (ICF ≈ 90% of gzipped JSON); the token advantage is the one compression cannot recover inside an LLM context window.

Throughput (1,000 nested records, median ms — a JavaScript-only measurement)

LibraryParseSerialize
JSON (native JSON.parse)2211
ICF (icf.js)9851
XML (fast-xml-parser)70761
YAML (yaml)3,987455

Read this honestly: native JSON parsing (C++ inside V8) is ~4× faster than icf.js; icf.js is in turn ~7× faster than the popular XML parser and ~40× faster than the YAML parser. This compares Node libraries only — it is not a cross-language claim.

Method

  • The corpus is generated from fixed seeds — every run on every machine measures byte-identical inputs.
  • Every format serializes the same logical tree; all values are strings, so no format gains or loses from number formatting.
  • ICF text comes from icf.js schema inference: the schema is declared once, records are positional rows — which is precisely where the savings come from.
  • The Claude tokenizer package implements the legacy Claude BPE (current Claude tokenizers are not public); it is included as a distinct family, not a billing claim.
  • * XML's "no" on fidelity reflects the array/type ambiguity of naive XML round-trips with default settings.

Full tables (three corpus sizes, gzip columns, both corpora) and the harness: icformat/icf-benchmarks. Reproduce with npm install && node src/run.mjs.