Many libraries implement the Standard Schema interface, which allows many other libraries to accept them without needing to specialise for each library.
Copy to clipboardimport { personSchema } from "./schemas"; const person = await upfetch(url, { schema: personSchema });
We benchmark the time taken to parse using a standard schema.
Info
Some libraries require an adapter before they can be used as a standard schema. The time to convert the schema is not measured, only the time to parse using it.
| Library | Version | /wk | Optimizations | Error type | Mean | Compare | |||
|---|---|---|---|---|---|---|---|---|---|
ata-validator | Code snippet | 1.6.2 | 1.78K | JIT | All errors | 2 μs | |||
@paseri/compiler | Code snippet | 0.7.7 | 153 | Precompiled | All errors | 3 μs | 2.26x | ||
joi | Code snippet | 18.2.5 | 24.98M | None | All errors | 5 μs | 3x | ||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 30.12M | None | Abort early | 5 μs | 3.23x | ||
@paseri/paseri | Code snippet | 1.9.7 | 151 | None | All errors | 6 μs | 3.82x | ||
sury | Code snippet | 11.0.0-rc.1 | 305.51K | JIT | All errors | 9 μs | 5.86x | ||
typia | Code snippet(Commented code is not benchmarked) | 14.0.0 | 329.74K | Precompiled | All errors | 21 μs | 13.78x | ||
valibot | Code snippet | 1.4.2 | 17.67M | None | All errors | 28 μs | 18.17x | ||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 30.12M | None | Abort early | 29 μs | 19.23x | ||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 30.12M | None | All errors | 29 μs | 19.25x | ||
@railway-ts/pipelines | Code snippet | 0.1.29 | 265 | None | All errors | 30 μs | 20.07x | ||
zod/v3 | Code snippet | 4.4.3 | 265.74M | None | All errors | 35 μs | 22.83x | ||
zod-compiler (compact) | Code snippet | 1.27.0 | 68.22K | Precompiled | All errors | 55 μs | 36.09x | ||
zod | Code snippet | 4.4.3 | 265.74M | JIT | All errors | 56 μs | 36.84x | ||
zod/mini | Code snippet | 4.4.3 | 265.74M | JIT | All errors | 59 μs | 38.57x | ||
zod-compiler | Code snippet | 1.27.0 | 68.22K | Precompiled | All errors | 59 μs | 38.63x | ||
zod-compiler (bag) | Code snippet | 1.27.0 | 68.22K | Precompiled | All errors | 60 μs | 39.36x | ||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 30.12M | None | All errors | 64 μs | 42.09x | ||
decoders | Code snippet | 2.9.3 | 28.35K | None | All errors | 67 μs | 44.44x | ||
arktype | Code snippet | 2.2.3 | 1.7M | JIT | All errors | 89 μs | 58.38x | ||
yup | Code snippet | 1.7.1 | 12.55M | None | All errors | 597 μs | 393.37x | ||