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.6.1 | 1.06K | JIT | All errors | 2 μs | |||
sury | Code snippet | 11.0.0-rc.1 | 240.68K | JIT | All errors | 9 μs | 5.93x | ||
zod | Code snippet | 4.4.3 | 223.55M | JIT | All errors | 66 μs | 43.03x | ||
zod/mini | Code snippet | 4.4.3 | 223.55M | JIT | All errors | 66 μs | 43.28x | ||
arktype | Code snippet | 2.2.3 | 1.4M | JIT | All errors | 97 μs | 63.36x | ||