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 | ||||
|---|---|---|---|---|---|---|---|---|---|---|
@paseri/compiler | Code snippet | 0.7.7 | 104 | Precompiled | All errors | 3 μs | ||||
joi | Code snippet | 18.2.3 | 23.69M | None | All errors | 5 μs | 1.37x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 26.02M | None | Abort early | 5 μs | 1.52x | |||
@paseri/paseri | Code snippet | 1.9.7 | 108 | None | All errors | 6 μs | 1.76x | |||
sury | Code snippet | 11.0.0-alpha.11 | 291.77K | JIT | All errors | 8 μs | 2.42x | |||
typia | Code snippet(Commented code is not benchmarked) | 13.2.0 | 322.95K | Precompiled | All errors | 21 μs | 6.31x | |||
valibot | Code snippet | 1.4.2 | 15.65M | None | All errors | 29 μs | 8.75x | |||
@railway-ts/pipelines | Code snippet | 0.1.29 | 131 | None | All errors | 31 μs | 9.38x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 26.02M | None | Abort early | 32 μs | 9.68x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 26.02M | None | All errors | 32 μs | 9.71x | |||
zod/v3 | Code snippet | 4.4.3 | 240.5M | None | All errors | 35 μs | 10.48x | |||
ata-validator | Code snippet | 1.2.1 | 979 | JIT | All errors | 65 μs | 19.41x | |||
zod | Code snippet | 4.4.3 | 240.5M | JIT | All errors | 65 μs | 19.64x | |||
zod/mini | Code snippet | 4.4.3 | 240.5M | JIT | All errors | 66 μs | 19.83x | |||
decoders | Code snippet | 2.9.3 | 54.62K | None | All errors | 74 μs | 22.1x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 26.02M | None | All errors | 75 μs | 22.4x | |||
arktype | Code snippet | 2.2.3 | 1.39M | JIT | All errors | 99 μs | 29.65x | |||
yup | Code snippet | 1.7.1 | 12.65M | None | All errors | 568 μs | 170.61x | |||