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 | /wk | Optimizations | Error type | Mean | Compare | |||
|---|---|---|---|---|---|---|---|---|---|
ata-validator | Code snippet | 1.3.0 | 1.14K | JIT | All errors | 2 μs | |||
@paseri/compiler | Code snippet | 0.7.7 | 103 | Precompiled | All errors | 3 μs | 2.09x | ||
joi | Code snippet | 18.2.3 | 23.54M | None | All errors | 5 μs | 2.87x | ||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 26.04M | None | Abort early | 5 μs | 3.1x | ||
@paseri/paseri | Code snippet | 1.9.7 | 93 | None | All errors | 6 μs | 3.66x | ||
sury | Code snippet | 11.0.0-rc.0 | 320.77K | JIT | All errors | 8 μs | 5.01x | ||
typia | Code snippet(Commented code is not benchmarked) | 13.2.0 | 350.5K | Precompiled | All errors | 21 μs | 12.97x | ||
valibot | Code snippet | 1.4.2 | 16.52M | None | All errors | 30 μs | 18.25x | ||
@railway-ts/pipelines | Code snippet | 0.1.29 | 225 | None | All errors | 31 μs | 19.28x | ||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 26.04M | None | Abort early | 32 μs | 19.97x | ||
effect@beta | Code snippet(Commented code is not benchmarked) | 4.0.0-beta.101 | 26.04M | None | All errors | 32 μs | 20.07x | ||
zod/v3 | Code snippet | 4.4.3 | 251.7M | None | All errors | 36 μs | 22.41x | ||
zod/mini | Code snippet | 4.4.3 | 251.7M | JIT | All errors | 66 μs | 40.75x | ||
zod | Code snippet | 4.4.3 | 251.7M | JIT | All errors | 67 μs | 41.1x | ||
effect | Code snippet(Commented code is not benchmarked) | 3.22.0 | 26.04M | None | All errors | 73 μs | 45.03x | ||
decoders | Code snippet | 2.9.3 | 37.07K | None | All errors | 80 μs | 49.27x | ||
arktype | Code snippet | 2.2.3 | 1.36M | JIT | All errors | 97 μs | 60.2x | ||
yup | Code snippet | 1.7.1 | 12.02M | None | All errors | 558 μs | 344.45x | ||