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 | ||||
|---|---|---|---|---|---|---|---|---|---|---|
sury | Code snippet | 11.0.0-alpha.4 | 146.04K | JIT | All errors | 8 μs | ||||
ata-validator | Code snippet | 0.8.0 | 728 | JIT | All errors | 8 μs | 1.07x | |||
zod | Code snippet | 4.3.6 | 151.14M | JIT | All errors | 63 μs | 8x | |||
zod/mini | Code snippet | 4.3.6 | 151.14M | JIT | All errors | 64 μs | 8.11x | |||
arktype | Code snippet | 2.2.0 | 885.45K | JIT | All errors | 89 μs | 11.37x | |||