LogoLogo

Schema Benchmarks

    • home
      Home

    • download_2
      Download

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

    • error
      Stack

    • article
      Blog
Code styleCode style
Normal styleNormal style
System themeSystem theme
Light themeLight theme
Dark themeDark theme
Expand sidebarExpand sidebar
Benchmarks/Standard SchemaStandard Schema
Code styleCode style
Normal styleNormal style
System themeSystem theme
Light themeLight theme
Dark themeDark theme
github
GitHubGitHub
DiscordDiscord

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
errorInvalidcheck_circleValid
Optimizations
flash_offNonecodeJITbuildPrecompiled
Abort early
errorAll errorswarningAbort early
LibrarysortVersionDownloads (/wk)sortOptimizationsError typeMeanarrow_upwardCompare
sury
Code snippetCode snippet
upfetch(url, { schema })
11.0.0-alpha.4146.04KJITAll errors8 μs
ata-validator
Code snippetCode snippet
upfetch(url, { schema })
0.8.0728JITAll errors8 μs
1.07x
stat_minus_1
zod
Code snippetCode snippet
upfetch(url, { schema })
4.3.6151.14MJITAll errors63 μs
8x
stat_minus_3
zod/mini
Code snippetCode snippet
upfetch(url, { schema })
4.3.6151.14MJITAll errors64 μs
8.11x
stat_minus_3
arktype
Code snippetCode snippet
upfetch(url, { schema })
2.2.0885.45KJITAll errors89 μs
11.37x
stat_minus_3
Created by eskimojo for Open Circle