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 | 1.2.2 | n/a | JIT | All errors | 2 μs | ||||
@paseri/compiler | Code snippet | 0.7.7 | 104 | Precompiled | All errors | 3 μs | 2.26x | |||
joi | Code snippet | 18.2.3 | n/a | None | All errors | 5 μs | 3.03x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | n/a | None | Abort early | 5 μs | 3.34x | |||
@paseri/paseri | Code snippet | 1.9.7 | 108 | None | All errors | 6 μs | 3.84x | |||
sury | Code snippet | 11.0.0-alpha.11 | n/a | JIT | All errors | 8 μs | 5.01x | |||
typia | Code snippet(Commented code is not benchmarked) | 13.2.0 | n/a | Precompiled | All errors | 21 μs | 13.75x | |||
valibot | Code snippet | 1.4.2 | n/a | None | All errors | 27 μs | 17.84x | |||
@railway-ts/pipelines | Code snippet | 0.1.29 | n/a | None | All errors | 29 μs | 18.83x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | n/a | None | Abort early | 30 μs | 19.9x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | n/a | None | All errors | 32 μs | 20.75x | |||
zod/v3 | Code snippet | 4.4.3 | n/a | None | All errors | 32 μs | 21.16x | |||
zod | Code snippet | 4.4.3 | n/a | JIT | All errors | 54 μs | 35.62x | |||
zod/mini | Code snippet | 4.4.3 | n/a | JIT | All errors | 56 μs | 37x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | n/a | None | All errors | 68 μs | 44.94x | |||
decoders | Code snippet | 2.9.3 | n/a | None | All errors | 73 μs | 47.84x | |||
arktype | Code snippet | 2.2.3 | n/a | JIT | All errors | 88 μs | 57.87x | |||
yup | Code snippet | 1.7.1 | n/a | None | All errors | 492 μs | 323.08x | |||