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 | 4 μs | 2.24x | |||
joi | Code snippet | 18.2.3 | 23.69M | None | All errors | 5 μs | 2.89x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 26.02M | None | Abort early | 5 μs | 3.24x | |||
@paseri/paseri | Code snippet | 1.9.7 | 108 | None | All errors | 6 μs | 3.71x | |||
sury | Code snippet | 11.0.0-alpha.11 | 291.77K | JIT | All errors | 8 μs | 4.76x | |||
typia | Code snippet(Commented code is not benchmarked) | 13.2.0 | 322.95K | Precompiled | All errors | 20 μs | 12.67x | |||
valibot | Code snippet | 1.4.2 | 15.65M | None | All errors | 27 μs | 17.05x | |||
@railway-ts/pipelines | Code snippet | 0.1.29 | 131 | None | All errors | 29 μs | 18.29x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 26.02M | None | Abort early | 31 μs | 19.1x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 26.02M | None | All errors | 31 μs | 19.1x | |||
zod/v3 | Code snippet | 4.4.3 | 240.5M | None | All errors | 32 μs | 20.08x | |||
zod | Code snippet | 4.4.3 | 240.5M | JIT | All errors | 55 μs | 34.14x | |||
zod/mini | Code snippet | 4.4.3 | 240.5M | JIT | All errors | 57 μs | 35.72x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 26.02M | None | All errors | 69 μs | 43.22x | |||
decoders | Code snippet | 2.9.3 | 54.62K | None | All errors | 72 μs | 44.95x | |||
arktype | Code snippet | 2.2.3 | 1.39M | JIT | All errors | 88 μs | 55.1x | |||
yup | Code snippet | 1.7.1 | 12.65M | None | All errors | 501 μs | 312.26x | |||