LogoLogo

Schema Benchmarks

    • home
      Home

    • download_2
      Download

    • timer
      Initialization
    • check_circle
      Validation
    • output_circle
      Parsing
    • swap_horiz
      Codec
    • schema
      Standard Schema
    • data_object
      JSON Schema
    • format_quote
      String

    • error
      Stack

    • deployed_code
      Libraries

    • article
      Blog
Expand sidebarExpand sidebar
Benchmarks/Standard SchemaStandard Schema
github
GitHubGitHub
DiscordDiscord
PreferencesPreferences

Many libraries implement the Standard Schema interface, which allows many other libraries to accept them without needing to specialise for each library.

Copy to clipboardCopy to clipboard
import { personSchema } from "./schemas"; const person = await upfetch(url, { schema: personSchema });

We benchmark the time taken to parse using a standard schema.

infoInfo

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.

Data
  • errorInvalid
  • check_circleValid
Optimizations
  • flash_offNone
  • codeJIT
  • buildPrecompiled
Abort early
  • errorAll errors
  • warningAbort early
LibrarysortVersionDownloads (/wk)sortOptimizationsError typeMeanarrow_upwardCompare
ata-validator
Code snippetCode snippet
upfetch(url, { schema })
1.2.2979JITAll errors2 μs
@paseri/compiler
Code snippetCode snippet
upfetch(url, { schema })
0.7.7104PrecompiledAll errors3 μs
2.08x
stat_minus_1
joi
Code snippetCode snippet
upfetch(url, { schema })
18.2.3n/aNoneAll errors5 μs
3.08x
stat_minus_1
effect
Code snippetCode snippet
// const standardSchema = Schema.standardSchemaV1(
//   schema, 
//   { errors: "first" }
// );
upfetch(url, { schema: standardSchema });

(Commented code is not benchmarked)

3.22.026.02MNoneAbort early5 μs
3.26x
stat_minus_1
@paseri/paseri
Code snippetCode snippet
upfetch(url, { schema })
1.9.7108NoneAll errors6 μs
3.67x
stat_minus_1
sury
Code snippetCode snippet
upfetch(url, { schema })
11.0.0-alpha.11291.77KJITAll errors8 μs
5.01x
stat_minus_1
typia
Code snippetCode snippet
// const validate = typia.createValidate<TypiaSchema>();
upfetch(url, { schema: validate })

(Commented code is not benchmarked)

13.2.0n/aPrecompiledAll errors22 μs
13.66x
stat_minus_1
valibot
Code snippetCode snippet
upfetch(url, { schema })
1.4.2n/aNoneAll errors30 μs
19.04x
stat_minus_1
@railway-ts/pipelines
Code snippetCode snippet
upfetch(url, { schema })
0.1.29n/aNoneAll errors31 μs
19.44x
stat_minus_1
zod/v3
Code snippetCode snippet
upfetch(url, { schema })
4.4.3240.5MNoneAll errors35 μs
22.22x
stat_minus_1
effect@beta
Code snippetCode snippet
// const standardSchema = Schema.toStandardSchemaV1(
//   schema, 
//   { parseOptions: { errors: "all" } }
// );
upfetch(url, { schema: standardSchema });

(Commented code is not benchmarked)

4.0.0-beta.10126.02MNoneAll errors44 μs
27.8x
stat_minus_1
effect@beta
Code snippetCode snippet
// const standardSchema = Schema.toStandardSchemaV1(
//   schema, 
//   { parseOptions: { errors: "first" } }
// );
upfetch(url, { schema: standardSchema });

(Commented code is not benchmarked)

4.0.0-beta.10126.02MNoneAbort early44 μs
28x
stat_minus_1
zod/mini
Code snippetCode snippet
upfetch(url, { schema })
4.4.3240.5MJITAll errors65 μs
41.2x
stat_minus_1
zod
Code snippetCode snippet
upfetch(url, { schema })
4.4.3240.5MJITAll errors68 μs
42.7x
stat_minus_1
decoders
Code snippetCode snippet
upfetch(url, { schema })
2.9.3n/aNoneAll errors74 μs
46.56x
stat_minus_1
effect
Code snippetCode snippet
// const standardSchema = Schema.standardSchemaV1(
//   schema, 
//   { errors: "all" }
// );
upfetch(url, { schema: standardSchema });

(Commented code is not benchmarked)

3.22.026.02MNoneAll errors75 μs
46.99x
stat_minus_1
arktype
Code snippetCode snippet
upfetch(url, { schema })
2.2.3n/aJITAll errors98 μs
61.6x
stat_minus_1
yup
Code snippetCode snippet
upfetch(url, { schema })
1.7.1n/aNoneAll errors560 μs
353.01x
stat_minus_3
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser
Code ligatures