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 | ||||
|---|---|---|---|---|---|---|---|---|---|---|
@railway-ts/pipelines | Code snippet | 0.1.29 | 81 | None | All errors | 31 μs | ||||
arktype | Code snippet | 2.2.0 | 824.7K | JIT | All errors | 96 μs | 3.14x | |||
ata-validator | Code snippet | 0.12.1 | 740 | JIT | All errors | 9 μs | 3.44x | |||
decoders | Code snippet | 2.9.3 | 41.68K | None | All errors | 77 μs | 2.5x | |||
effect | Code snippet | 3.21.2 | 12.77M | None | Abort early | 5 μs | 6.3x | |||
effect | Code snippet | 3.21.2 | 12.77M | None | All errors | 79 μs | 2.58x | |||
effect@beta | Code snippet | 4.0.0-beta.57 | 12.77M | None | All errors | 30 μs | 1.02x | |||
effect@beta | Code snippet | 4.0.0-beta.57 | 12.77M | None | Abort early | 30 μs | 1.02x | |||
joi | Code snippet | 18.1.2 | 19.33M | None | All errors | 4 μs | 6.86x | |||
sury | Code snippet | 11.0.0-alpha.4 | 183.21K | JIT | All errors | 8 μs | 3.79x | |||
typia | Code snippet | 12.0.2 | 287.74K | Precompiled | All errors | 11 μs | 2.9x | |||
valibot | Code snippet | 1.3.1 | 9.22M | None | All errors | 28 μs | 1.07x | |||
yup | Code snippet | 1.7.1 | 10.79M | None | All errors | 549 μs | 17.98x | |||
zod | Code snippet | 4.3.6 | 162.73M | JIT | All errors | 75 μs | 2.44x | |||
zod/mini | Code snippet | 4.3.6 | 162.73M | JIT | All errors | 71 μs | 2.34x | |||
zod/v3 | Code snippet | 4.3.6 | 162.73M | None | All errors | 34 μs | 1.12x | |||