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.1.2 | 18.74M | None | All errors | 5 μs | ||||
effect | Code snippet(Commented code is not benchmarked) | 3.21.0 | 9.44M | None | Abort early | 5 μs | 1.14x | |||
valibot | Code snippet | 1.3.1 | 7.93M | None | All errors | 27 μs | 5.92x | |||
@railway-ts/pipelines | Code snippet | 0.1.27 | 34 | None | All errors | 29 μs | 6.43x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.46 | 9.44M | None | Abort early | 30 μs | 6.63x | |||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.46 | 9.44M | None | All errors | 30 μs | 6.66x | |||
zod/v3 | Code snippet | 4.3.6 | 151.14M | None | All errors | 33 μs | 7.14x | |||
effect | Code snippet(Commented code is not benchmarked) | 3.21.0 | 9.44M | None | All errors | 71 μs | 15.44x | |||
decoders | Code snippet | 2.9.3 | 38.55K | None | All errors | 94 μs | 20.56x | |||
yup | Code snippet | 1.7.1 | 10.79M | None | All errors | 497 μs | 108.85x | |||