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 | Downloads (/wk) | Optimizations | Error type | Mean | Compare | ||||
|---|---|---|---|---|---|---|---|---|---|---|
@railway-ts/pipelines | Code snippet | 0.1.27 | 34 | None | All errors | 29 μs | ||||
arktype | Code snippet | 2.2.0 | 885.45K | JIT | All errors | 89 μs | 3.04x | |||
ata-validator | Code snippet | 0.8.0 | 728 | JIT | All errors | 8 μs | 3.49x | |||
decoders | Code snippet | 2.9.3 | 38.55K | None | All errors | 94 μs | 3.2x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.21.0 | 9.44M | None | Abort early | 5 μs | 5.65x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.21.0 | 9.44M | None | All errors | 71 μs | 2.4x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.46 | 9.44M | None | Abort early | 30 μs | 1.03x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.46 | 9.44M | None | All errors | 30 μs | 1.04x | |||
joi | Code snippet | 18.1.2 | 18.74M | None | All errors | 5 μs | 6.43x | |||
sury | Code snippet | 11.0.0-alpha.4 | 146.04K | JIT | All errors | 8 μs | 3.74x | |||
typia | Code snippet(Commented code is not benchmarked) | 12.0.2 | 259.06K | Precompiled | All errors | 10 μs | 2.84x | |||
valibot | Code snippet | 1.3.1 | 7.93M | None | All errors | 27 μs | 1.09x | |||
yup | Code snippet | 1.7.1 | 10.79M | None | All errors | 497 μs | 16.94x | |||
zod | Code snippet | 4.3.6 | 151.14M | JIT | All errors | 63 μs | 2.14x | |||
zod/mini | Code snippet | 4.3.6 | 151.14M | JIT | All errors | 64 μs | 2.17x | |||
zod/v3 | Code snippet | 4.3.6 | 151.14M | None | All errors | 33 μs | 1.11x | |||