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 | 109 | Precompiled | All errors | 3 μs | ||||
joi | Code snippet | 18.2.3 | 22.46M | None | All errors | 4 μs | 1.38x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 24.01M | None | Abort early | 5 μs | 1.48x | |||
@paseri/paseri | Code snippet | 1.9.5 | 119 | None | All errors | 6 μs | 1.79x | |||
sury | Code snippet | 11.0.0-alpha.10 | 297.33K | JIT | All errors | 8 μs | 2.47x | |||
typia | Code snippet(Commented code is not benchmarked) | 13.1.0 | 312.92K | Precompiled | All errors | 11 μs | 3.4x | |||
valibot | Code snippet | 1.4.2 | 15.99M | None | All errors | 29 μs | 9.08x | |||
@railway-ts/pipelines | Code snippet | 0.1.29 | 226 | None | All errors | 30 μs | 9.46x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.98 | 24.01M | None | All errors | 31 μs | 9.81x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.98 | 24.01M | None | Abort early | 32 μs | 10.13x | |||
zod/v3 | Code snippet | 4.4.3 | 245.4M | None | All errors | 35 μs | 10.87x | |||
ata-validator | Code snippet | 0.21.0 | 1.08K | JIT | All errors | 43 μs | 13.46x | |||
zod/mini | Code snippet | 4.4.3 | 245.4M | JIT | All errors | 65 μs | 20.38x | |||
zod | Code snippet | 4.4.3 | 245.4M | JIT | All errors | 66 μs | 20.49x | |||
decoders | Code snippet | 2.9.3 | 49.01K | None | All errors | 69 μs | 21.59x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 24.01M | None | All errors | 72 μs | 22.64x | |||
arktype | Code snippet | 2.2.3 | 1.37M | JIT | All errors | 97 μs | 30.22x | |||
yup | Code snippet | 1.7.1 | 12.52M | None | All errors | 573 μs | 179.21x | |||