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 | 979 | JIT | All errors | 2 μs | ||||
@paseri/compiler | Code snippet | 0.7.7 | 104 | Precompiled | All errors | 3 μs | 2.08x | |||
joi | Code snippet | 18.2.3 | n/a | None | All errors | 5 μs | 3.08x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 26.02M | None | Abort early | 5 μs | 3.26x | |||
@paseri/paseri | Code snippet | 1.9.7 | 108 | None | All errors | 6 μs | 3.67x | |||
sury | Code snippet | 11.0.0-alpha.11 | 291.77K | JIT | All errors | 8 μs | 5.01x | |||
typia | Code snippet(Commented code is not benchmarked) | 13.2.0 | n/a | Precompiled | All errors | 22 μs | 13.66x | |||
valibot | Code snippet | 1.4.2 | n/a | None | All errors | 30 μs | 19.04x | |||
@railway-ts/pipelines | Code snippet | 0.1.29 | n/a | None | All errors | 31 μs | 19.44x | |||
zod/v3 | Code snippet | 4.4.3 | 240.5M | None | All errors | 35 μs | 22.22x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 26.02M | None | All errors | 44 μs | 27.8x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 26.02M | None | Abort early | 44 μs | 28x | |||
zod/mini | Code snippet | 4.4.3 | 240.5M | JIT | All errors | 65 μs | 41.2x | |||
zod | Code snippet | 4.4.3 | 240.5M | JIT | All errors | 68 μs | 42.7x | |||
decoders | Code snippet | 2.9.3 | n/a | None | All errors | 74 μs | 46.56x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 26.02M | None | All errors | 75 μs | 46.99x | |||
arktype | Code snippet | 2.2.3 | n/a | JIT | All errors | 98 μs | 61.6x | |||
yup | Code snippet | 1.7.1 | n/a | None | All errors | 560 μs | 353.01x | |||