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.5 | 39 | Precompiled | All errors | 3 μs | ||||
joi | Code snippet | 18.2.3 | 16.86M | None | All errors | 5 μs | 1.32x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.21.4 | 16.97M | None | Abort early | 5 μs | 1.5x | |||
@paseri/paseri | Code snippet | 1.9.5 | 56 | None | All errors | 6 μs | 1.65x | |||
sury | Code snippet | 11.0.0-alpha.9 | 207.16K | JIT | All errors | 8 μs | 2.22x | |||
typia | Code snippet(Commented code is not benchmarked) | 13.0.2 | 298.11K | Precompiled | All errors | 10 μs | 2.96x | |||
valibot | Code snippet | 1.4.2 | 13.57M | None | All errors | 27 μs | 7.86x | |||
@railway-ts/pipelines | Code snippet | 0.1.29 | 24 | None | All errors | 29 μs | 8.25x | |||
zod/v3 | Code snippet | 4.4.3 | 208.07M | None | All errors | 32 μs | 9.22x | |||
ata-validator | Code snippet | 0.21.0 | 443 | JIT | All errors | 40 μs | 11.44x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.97 | 16.97M | None | Abort early | 40 μs | 11.49x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.97 | 16.97M | None | All errors | 40 μs | 11.53x | |||
zod | Code snippet | 4.4.3 | 208.07M | JIT | All errors | 55 μs | 15.66x | |||
zod/mini | Code snippet | 4.4.3 | 208.07M | JIT | All errors | 57 μs | 16.37x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.21.4 | 16.97M | None | All errors | 70 μs | 19.99x | |||
decoders | Code snippet | 2.9.3 | 53.18K | None | All errors | 76 μs | 21.79x | |||
arktype | Code snippet | 2.2.3 | 1.15M | JIT | All errors | 88 μs | 25.32x | |||
yup | Code snippet | 1.7.1 | 9.42M | None | All errors | 510 μs | 145.95x | |||