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 | ||||
|---|---|---|---|---|---|---|---|---|---|---|
joi | Code snippet | 18.1.1 | 18.59M | None | All errors | 4 μs | ||||
effect | Code snippet(Commented code is not benchmarked) | 3.21.0 | 9.07M | None | Abort early | 5 μs | 1.07x | |||
sury | Code snippet | 11.0.0-alpha.4 | 130.86K | JIT | All errors | 8 μs | 1.89x | |||
ata-validator | Code snippet | 0.4.15 | 1.85K | JIT | All errors | 9 μs | 2.15x | |||
typia | Code snippet(Commented code is not benchmarked) | 12.0.1 | 282.35K | Precompiled | All errors | 11 μs | 2.42x | |||
valibot | Code snippet | 1.3.1 | 7.46M | None | All errors | 29 μs | 6.61x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.40 | 9.07M | None | All errors | 30 μs | 6.88x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.40 | 9.07M | None | Abort early | 31 μs | 6.96x | |||
@railway-ts/pipelines | Code snippet | 0.1.27 | 31 | None | All errors | 31 μs | 7.07x | |||
zod/v3 | Code snippet | 4.3.6 | 146.36M | None | All errors | 35 μs | 7.89x | |||
decoders | Code snippet | 2.9.1 | 41.51K | None | All errors | 74 μs | 16.78x | |||
zod/mini | Code snippet | 4.3.6 | 146.36M | JIT | All errors | 75 μs | 16.87x | |||
zod | Code snippet | 4.3.6 | 146.36M | JIT | All errors | 76 μs | 17.28x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.21.0 | 9.07M | None | All errors | 84 μs | 18.9x | |||
arktype | Code snippet | 2.2.0 | 911.72K | JIT | All errors | 96 μs | 21.63x | |||
yup | Code snippet | 1.7.1 | 10.53M | None | All errors | 565 μs | 127.83x | |||