P3.5.3 — Comparative benchmark suite#107
Merged
Merged
Conversation
Add a benchmarks/ workspace package with a reproducible performance harness measuring four dimensions of TypeStyles performance against a 50-component reference design system: CSS generation time, extracted CSS file size across all naming modes, runtime injection latency, and SSR collection overhead. Includes a Vanilla Extract comparison using the same 50-component design system ported to recipe()/style()/createThemeContract() APIs. Key results (Apple Silicon): - Style registration: ~1.0ms (50 components + 8 token namespaces + 3 themes) - Selector calls: ~0.10ms for ~90 invocations - Extracted CSS: 19.0–31.4 KB raw (4.7 KB gzip) across naming modes - SSR collection: ~1.1ms per request - vs Vanilla Extract: comparable file sizes, both sub-2ms registration Also: - CI benchmark job with regression detection (20% timing / 5% size thresholds) - Docs benchmarks page with methodology and honest caveats - Fix: reset() now clears registeredNamespaces (was a gap in test cleanup) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Timing varies ~3x between Apple Silicon and CI VMs — a checked-in baseline from one platform can't reliably gate the other. File sizes are deterministic and platform-independent, so they're the only regression signal in CI. Timing results are still printed for visibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
benchmarks/workspace package with a reproducible performance harness measuring 4 dimensions of TypeStyles performance against a 50-component reference design systemrecipe()/style()/createThemeContract()APIsreset()to clearregisteredNamespaces(was a gap requiring manual cleanup in tests)Key results (Apple Silicon)
Test plan
bench:ci)tsc --noEmitin benchmarks/)turbo run testpasses (36 tasks)🤖 Generated with Claude Code