From 607926ca61ebf0373a2973f6b90d3ba6cace9d9a Mon Sep 17 00:00:00 2001 From: Johann Schopplich Date: Fri, 24 Oct 2025 17:53:35 +0200 Subject: [PATCH] docs: update benchmarks table --- README.md | 6 +++--- docs/benchmarks.md | 6 +++--- scripts/generate-bench.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 81e4767..dcd1b71 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ AI is becoming cheaper and more accessible, but larger context windows allow for -| Example | JSON | TOON | Saved | Reduction | -|---------|------|------|-------|-----------| +| Example | JSON | TOON | Tokens Saved | Reduction | +| ------- | ---- | ---- | ------------ | --------- | | 👤 Simple user object | 31 | 18 | 13 | **41.9%** | | 🏷️ User with tags | 48 | 28 | 20 | **41.7%** | | 📦 Small product catalog | 117 | 49 | 68 | **58.1%** | @@ -31,7 +31,7 @@ AI is becoming cheaper and more accessible, but larger context windows allow for | **Total** | **2917** | **1139** | **1778** | **61.0%** |
-View detailed examples +View detailed results ### 📦 Small product catalog diff --git a/docs/benchmarks.md b/docs/benchmarks.md index 2add47f..ad99f1a 100644 --- a/docs/benchmarks.md +++ b/docs/benchmarks.md @@ -1,5 +1,5 @@ -| Example | JSON | TOON | Saved | Reduction | -|---------|------|------|-------|-----------| +| Example | JSON | TOON | Tokens Saved | Reduction | +| ------- | ---- | ---- | ------------ | --------- | | 👤 Simple user object | 31 | 18 | 13 | **41.9%** | | 🏷️ User with tags | 48 | 28 | 20 | **41.7%** | | 📦 Small product catalog | 117 | 49 | 68 | **58.1%** | @@ -11,7 +11,7 @@ | **Total** | **2917** | **1139** | **1778** | **61.0%** |
-View detailed examples +View detailed results ### 📦 Small product catalog diff --git a/scripts/generate-bench.ts b/scripts/generate-bench.ts index 651d28a..e5dc26d 100644 --- a/scripts/generate-bench.ts +++ b/scripts/generate-bench.ts @@ -192,13 +192,13 @@ ${encodeToon(example.data)} .join('\n\n') const markdown = ` -| Example | JSON | TOON | Saved | Reduction | -|---------|------|------|-------|-----------| +| Example | JSON | TOON | Tokens Saved | Reduction | +| ------- | ---- | ---- | ------------ | --------- | ${summaryRows} | **Total** | **${totalJsonTokens}** | **${totalToonTokens}** | **${totalSavings}** | **${totalSavingsPercent}%** |
-View detailed examples +View detailed results ${detailedExamples}