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 | ||||
|---|---|---|---|---|---|---|---|---|---|---|
ata-validator | Code snippet | 0.8.0 | 728 | JIT | All errors | 186 ns | ||||
typia | Code snippet(Commented code is not benchmarked) | 12.0.2 | 259.06K | Precompiled | All errors | 1 μs | 6.1x | |||
sury | Code snippet | 11.0.0-alpha.4 | 146.04K | JIT | All errors | 2 μs | 12.39x | |||
arktype | Code snippet | 2.2.0 | 885.45K | JIT | All errors | 6 μs | 34.02x | |||
zod | Code snippet | 4.3.6 | 151.14M | JIT | All errors | 9 μs | 48.51x | |||
valibot | Code snippet | 1.3.1 | 7.93M | None | All errors | 12 μs | 63.01x | |||
zod/mini | Code snippet | 4.3.6 | 151.14M | JIT | All errors | 14 μs | 72.93x | |||
zod/v3 | Code snippet | 4.3.6 | 151.14M | None | All errors | 15 μs | 80.77x | |||
decoders | Code snippet | 2.9.3 | 38.55K | None | All errors | 16 μs | 85.49x | |||
@railway-ts/pipelines | Code snippet | 0.1.27 | 34 | None | All errors | 18 μs | 95.73x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.46 | 9.44M | None | All errors | 20 μs | 105.86x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.21.0 | 9.44M | None | Abort early | 20 μs | 105.99x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.21.0 | 9.44M | None | All errors | 20 μs | 106.49x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.46 | 9.44M | None | Abort early | 20 μs | 107.77x | |||
joi | Code snippet | 18.1.2 | 18.74M | None | All errors | 39 μs | 210.8x | |||
yup | Code snippet | 1.7.1 | 10.79M | None | All errors | 136 μs | 730.54x | |||