Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryoppippi/json-schema-benchmark
JSON Schema Generation Benchmark
https://github.com/ryoppippi/json-schema-benchmark
bun json-schema tschema typebox typescript typia zod
Last synced: 17 days ago
JSON representation
JSON Schema Generation Benchmark
- Host: GitHub
- URL: https://github.com/ryoppippi/json-schema-benchmark
- Owner: ryoppippi
- License: mit
- Archived: true
- Created: 2024-08-07T17:50:42.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-07T21:27:44.000Z (6 months ago)
- Last Synced: 2024-09-25T19:05:02.984Z (4 months ago)
- Topics: bun, json-schema, tschema, typebox, typescript, typia, zod
- Language: TypeScript
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-schema-benchmark
To install dependencies:
```bash
bun install
```To run:
```bash
bun run index.ts
```## Result
```sh
~/g/g/r/JSON-Schema-Benchmark main• ❱ bun run index.ts
platform: Darwin 23.5.0 arm64 arm
bun version: 1.1.21+70ca2b76c
benchmark start
┌───┬───────────────────┬────────────┬────────────────────┬────────┬──────────┐
│ │ Task Name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
├───┼───────────────────┼────────────┼────────────────────┼────────┼──────────┤
│ 0 │ typia │ 32,816,961 │ 30.4720474430912 │ ±1.79% │ 32816962 │
│ 1 │ tschema │ 3,475,386 │ 287.73780848206604 │ ±1.20% │ 3475387 │
│ 2 │ @sinclair/typebox │ 2,689,724 │ 371.7852713569184 │ ±0.98% │ 2689725 │
│ 3 │ zod │ 71,656 │ 13955.375169085659 │ ±1.52% │ 71709 │
└───┴───────────────────┴────────────┴────────────────────┴────────┴──────────┘
```## Related
This benchmark code is based on
[lukeed/tschema](https://github.com/lukeed/tschema)## Related my projects
- [unplugin-typia](https://github.com/ryoppippi/unplugin-typia)
- [openai with typia](https://github.com/ryoppippi/openai-with-typia)## License
[MIT](./LICENSE)