Skip to content

Add a reference implementation derived from Chromium's impl - #12

Closed
RByers wants to merge 8 commits into
WICG:mainfrom
RByers:refimpl
Closed

RByers wants to merge 8 commits into
WICG:mainfrom
RByers:refimpl

Conversation

@RByers

@RByers RByers commented Jun 20, 2026 •

Copy link
Copy Markdown
Member

Adds a reference implementation, unit tests and demo page using this implementation. This exactly matches the current Chromium implementation using an LLM. Hoping to help with #2.


Preview | Diff

@RByers

RByers commented Jun 20, 2026 •

Copy link
Copy Markdown
Member Author

I'm not sure if this is a good idea or not, but given concerns we've heard from Mozilla and the W3C TAG about interoperability of this API I think it may be reasonable to include a full reference implementation alongside the specification. WDYT?

Deriving this reference impl from the chromium impl was basically a one-shot prompt with Claude Opus, so I think keeping such a reference implementation in-sync with one or more browser implementations (in either direction) is essentially a solved problem now.

Note this is a sketch for discussion purposes, I have not reviewed every line in this PR by hand yet so there's probably some AI slop here.

Comment thread cpu_performance.test.js Resolved
@domfarolino

Copy link
Copy Markdown
Collaborator

Given #13 (comment), it sounds like this reference implementation has made it into the repo alongside a decent baseline algorithm for vendors to base their implementation off of. With that, I think this is redundant with #13 and we can close it out. Thanks again @RByers.

@domfarolino domfarolino closed this Aug 7, 2026
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.

3 participants