Skip to content

Conversation

@sberan
Copy link
Owner

@sberan sberan commented Jan 9, 2026

Add a new "shorthand" example tab that demonstrates using type
strings directly (e.g., schema('string')) instead of full object
notation. Also update extractSchemaFromCode to parse shorthand syntax.

Add a new "shorthand" example tab that demonstrates using type
strings directly (e.g., schema('string')) instead of full object
notation. Also update extractSchemaFromCode to parse shorthand syntax.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Benchmark Results

Only tests where both validators pass are compared (apples-to-apples)

tjs vs ajv

Draft Tests tjs ajv Winner
draft4 790 27.8M 13.2M 🟢 tjs 2.11×
draft6 1120 30.1M 14.9M 🟢 tjs 2.02×
draft7 1324 28.0M 13.5M 🟢 tjs 2.07×
draft2019-09 1703 25.0M 6.4M 🟢 tjs 3.93×
draft2020-12 1665 27.6M 6.8M 🟢 tjs 4.08×

Overall: 🟢 tjs is 3.09× faster on 6602 shared tests

tjs vs is-my-json-valid

Draft Tests tjs is-my-json-valid Winner
draft4 640 37.5M 14.8M 🟢 tjs 2.53×
draft6 703 38.1M 16.6M 🟢 tjs 2.29×
draft7 732 45.9M 19.0M 🟢 tjs 2.42×
draft2019-09 842 44.9M 20.6M 🟢 tjs 2.18×
draft2020-12 785 46.8M 20.2M 🟢 tjs 2.32×

Overall: 🟢 tjs is 2.34× faster on 3702 shared tests

tjs vs djv

Draft Tests tjs djv Winner
draft4 540 38.4M 3.7M 🟢 tjs 10.43×
draft6 706 40.4M 3.6M 🟢 tjs 11.12×
draft7 760 43.6M 4.0M 🟢 tjs 10.85×
draft2019-09 868 42.0M 4.9M 🟢 tjs 8.58×
draft2020-12 843 45.5M 4.6M 🟢 tjs 9.83×

Overall: 🟢 tjs is 10.09× faster on 3717 shared tests

tjs vs jsen

Draft Tests tjs jsen Winner
draft4 671 36.0M 15.0M 🟢 tjs 2.40×
draft6 707 36.6M 15.6M 🟢 tjs 2.35×
draft7 736 43.8M 17.8M 🟢 tjs 2.46×
draft2019-09 838 42.6M 17.0M 🟢 tjs 2.52×
draft2020-12 792 45.6M 18.0M 🟢 tjs 2.54×

Overall: 🟢 tjs is 2.45× faster on 3744 shared tests

tjs vs schemasafe

Draft Tests tjs schemasafe Winner
draft4 821 27.9M 21.6M 🟢 tjs 1.29×
draft6 1104 29.8M 23.4M 🟢 tjs 1.27×
draft7 1238 31.3M 21.1M 🟢 tjs 1.48×
draft2019-09 1641 27.8M 18.9M 🟢 tjs 1.47×
draft2020-12 1540 27.6M 15.2M 🟢 tjs 1.81×

Overall: 🟢 tjs is 1.50× faster on 6344 shared tests

@sberan sberan merged commit 11f84c9 into main Jan 19, 2026
35 checks passed
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.

2 participants