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 | ||||
|---|---|---|---|---|---|---|---|---|---|---|
joi | Code snippet | 18.2.1 | 19.35M | None | All errors | 4 μs | ||||
effect | Code snippet(Commented code is not benchmarked) | 3.21.2 | 16.32M | None | Abort early | 5 μs | 1.07x | |||
sury | Code snippet | 11.0.0-alpha.6 | 236.4K | JIT | All errors | 8 μs | 1.75x | |||
typia | Code snippet(Commented code is not benchmarked) | 12.1.1 | 275.54K | Precompiled | All errors | 11 μs | 2.43x | |||
valibot | Code snippet | 1.4.1 | 10.84M | None | All errors | 28 μs | 6.37x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.71 | 16.32M | None | Abort early | 29 μs | 6.6x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.71 | 16.32M | None | All errors | 29 μs | 6.6x | |||
@railway-ts/pipelines | Code snippet | 0.1.29 | 63 | None | All errors | 30 μs | 6.86x | |||
zod/v3 | Code snippet | 4.4.3 | 180.69M | None | All errors | 34 μs | 7.67x | |||
ata-validator | Code snippet | 0.18.2 | 2.58K | JIT | All errors | 46 μs | 10.52x | |||
zod/mini | Code snippet | 4.4.3 | 180.69M | JIT | All errors | 64 μs | 14.46x | |||
zod | Code snippet | 4.4.3 | 180.69M | JIT | All errors | 64 μs | 14.6x | |||
decoders | Code snippet | 2.9.3 | 48.89K | None | All errors | 69 μs | 15.58x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.21.2 | 16.32M | None | All errors | 72 μs | 16.3x | |||
arktype | Code snippet | 2.2.0 | 1.01M | JIT | All errors | 96 μs | 21.75x | |||
yup | Code snippet | 1.7.1 | 10.62M | None | All errors | 545 μs | 123.47x | |||