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 | ||||
|---|---|---|---|---|---|---|---|---|---|---|
yup | Code snippet | 1.7.1 | 10.79M | None | All errors | 549 μs | ||||
arktype | Code snippet | 2.2.0 | 824.7K | JIT | All errors | 96 μs | 5.72x | |||
effect | Code snippet | 3.21.2 | 12.77M | None | All errors | 79 μs | 6.97x | |||
decoders | Code snippet | 2.9.3 | 41.68K | None | All errors | 77 μs | 7.18x | |||
zod | Code snippet | 4.3.6 | 162.73M | JIT | All errors | 75 μs | 7.35x | |||
zod/mini | Code snippet | 4.3.6 | 162.73M | JIT | All errors | 71 μs | 7.69x | |||
zod/v3 | Code snippet | 4.3.6 | 162.73M | None | All errors | 34 μs | 16.04x | |||
@railway-ts/pipelines | Code snippet | 0.1.29 | 81 | None | All errors | 31 μs | 17.98x | |||
effect@beta | Code snippet | 4.0.0-beta.57 | 12.77M | None | Abort early | 30 μs | 18.29x | |||
effect@beta | Code snippet | 4.0.0-beta.57 | 12.77M | None | All errors | 30 μs | 18.35x | |||
valibot | Code snippet | 1.3.1 | 9.22M | None | All errors | 28 μs | 19.3x | |||
typia | Code snippet | 12.0.2 | 287.74K | Precompiled | All errors | 11 μs | 52.18x | |||
ata-validator | Code snippet | 0.12.1 | 740 | JIT | All errors | 9 μs | 61.86x | |||
sury | Code snippet | 11.0.0-alpha.4 | 183.21K | JIT | All errors | 8 μs | 68.11x | |||
effect | Code snippet | 3.21.2 | 12.77M | None | Abort early | 5 μs | 113.34x | |||
joi | Code snippet | 18.1.2 | 19.33M | None | All errors | 4 μs | 123.35x | |||