Repository navigation
Conversation
Adds a /compare page that runs origin/main, perf/faster-serialize and devalue in the same interleaved rounds. devalue is adapted to the SuperJSON call shape and checked by round-trip fidelity, because its text differs from superjson's. Cases devalue refuses (classes, symbols, custom types, Errors, Promises) are recorded as refused instead of timed. Also adds benchmarks/devalue-features.ts, a per-feature round-trip table, and devalue as a dev dependency.
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.
Compares superjson 2.2.3 (the version col-web ships), superjson origin/main, PR ravionhq#364 (
perf/faster-serialize) and devalue 6.0.3, interleaved in one browser page. Fork-internal, not for upstream.Harness:
/comparepage inbenchmarks/compare-app.ts, a devalue adapter inbenchmarks/devalue-lib.ts, and a per-feature check inbenchmarks/devalue-features.ts. Commands:bun benchmarks/ledger-run.ts --page /compare --throttle 3.79 --repeat 10 --filter "RQ persisted,tRPC-like,1000 users with 2 Dates,deep nested dates,shared refs: 1000" --ops stringify,parse,serialize,deserialize.Col-web cache fixture, 3.79× CPU, 10 runs, mean ms (speedup vs 2.2.3):
200 cases, unthrottled, one run, geomean speedup vs 2.2.3: ravionhq#364 serialize 3.40×, stringify 2.70×, deserialize 1.88×, parse 1.07×. devalue serialize 2.55×, stringify 3.33×, deserialize 1.37×, parse 1.31×. devalue refuses 5 fixtures (Error objects, class instances, symbols, custom transformers, and a mixed fixture).
Note:
errors (200)differs between 2.2.3 and origin/main on deserialize and parse, because ravionhq#354 stopped inventing a cause on Errors.