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
    • assignment_turned_in
      TypeScript

  • JSON Schema

    • data_object
      Schema to JSON
    • code
      JSON to Schema
    • verified
      Compliance

    • deployed_code
      Libraries

    • article
      Blog
Expand sidebarExpand sidebar
Benchmarks/InitializationInitialization
github
GitHubGitHub
DiscordDiscord
PreferencesPreferences

Creating a schema. This is usually a one time cost.

schemas.ts
Copy to clipboardCopy to clipboard
import * as v from "valibot"; export const personSchema = v.object({ name: v.string(), age: v.number(), });
Optimizations
  • flash_offNone
  • codeJIT
  • buildPrecompiled
LibrarysortVersiondownload/wksortOptimizationsMeanarrow_upwardCompare
ajv
Code snippetCode snippet
ajv.compile(schema)
8.20.0n/aJIT3 ms
typebox (script compile)
Code snippetCode snippet
Schema.Compile(Type.Script(context, input))
1.3.34n/aJIT1 ms
2.74x
stat_1
typebox (script)
Code snippetCode snippet
Type.Script(context, input)
1.3.34n/aJIT1 ms
2.76x
stat_1
runtypes
Code snippetCode snippet
Object(fields)
7.0.5n/aNone804 μs
3.64x
stat_1
effect (decodeUnknownEither)
Code snippetCode snippet
Schema.decodeUnknownEither(Schema.Struct(fields))
3.22.2n/aNone385 μs
7.61x
stat_1
effect
Code snippetCode snippet
Schema.Struct(fields)
3.22.2n/aNone334 μs
8.77x
stat_1
arktype
Code snippetCode snippet
type(def)
2.2.3n/aJIT301 μs
9.73x
stat_1
zod (compile)
Code snippetCode snippet
z.compile(z.object(shape), { strict: true })
4.6.5n/aJIT269 μs
10.91x
stat_1
zod/mini (compile)
Code snippetCode snippet
z.compile(z.object(shape), { strict: true })
4.6.5n/aJIT200 μs
14.61x
stat_1
zod
Code snippetCode snippet
z.object({
  title: z.string().min(1).max(100),
  ...shape
})
4.6.5n/aJIT139 μs
21.09x
stat_1
sury (isInput)
Code snippetCode snippet
S.isInput(S.schema(value))
11.0.0n/aJIT127 μs
23.1x
stat_1
typebox (compile)
Code snippetCode snippet
Compile(Type.Object(properties))
1.3.34n/aJIT127 μs
23.11x
stat_1
typebox (schema compile)
Code snippetCode snippet
Schema.Compile(Type.Object(properties))
1.3.34n/aJIT120 μs
24.33x
stat_1
effect@rc
Code snippetCode snippet
Schema.Struct(fields)
4.0.0-rc.112n/aNone118 μs
24.81x
stat_1
effect@rc (decodeUnknownOption)
Code snippetCode snippet
Schema.decodeUnknownOption(Schema.Struct(fields))
4.0.0-rc.112n/aNone114 μs
25.79x
stat_1
sury (parseOrThrow)
Code snippetCode snippet
S.parseOrThrow(S.schema(value))
11.0.0n/aJIT104 μs
28.17x
stat_1
joi
Code snippetCode snippet
object(schema)
18.2.9n/aNone94 μs
31.33x
stat_1
yup
Code snippetCode snippet
object(spec)
1.7.1n/aNone81 μs
36.39x
stat_1
zod/mini
Code snippetCode snippet
z.object({
  title: z.string().check(
    z.minLength(1), 
    z.maxLength(100),
  ),
  ...shape
})
4.6.5n/aJIT70 μs
41.97x
stat_1
zod (factory)
Code snippetCode snippet
z.object({
  title: z.string({ 
    checks: [
      z.minLength(1), 
      z.maxLength(100)
    ],
  }),
  ...shape
})
4.6.5n/aJIT61 μs
47.9x
stat_1
zod/mini (factory)
Code snippetCode snippet
z.object({
  title: z.string({ 
    checks: [
      z.minLength(1), 
      z.maxLength(100),
    ],
  }),
  ...shape
})
4.6.5n/aJIT52 μs
56.63x
stat_1
zod/v3
Code snippetCode snippet
z.object(shape)
4.6.5n/aNone36 μs
82.45x
stat_1
@sapphire/shapeshift
Code snippetCode snippet
s.object(shape)
5.0.0n/aNone29 μs
102.14x
stat_1
typebox
Code snippetCode snippet
Type.Object(properties)
1.3.34n/aJIT9 μs
337.21x
stat_1
ata-validator
Code snippetCode snippet
new Validator(schema)
1.27.12.4KJIT9 μs
343.67x
stat_1
@remix-run/data-schema
Code snippetCode snippet
object(shape)
0.3.1n/aNone8 μs
370.19x
stat_1
decoders
Code snippetCode snippet
object(decoders)
2.10.1n/aNone5 μs
577.63x
stat_1
sury
Code snippetCode snippet
S.schema(value)
11.0.0n/aJIT5 μs
605.8x
stat_1
superstruct
Code snippetCode snippet
object(schema)
2.0.2n/aNone3 μs
881.28x
stat_1
io-ts
Code snippetCode snippet
t.type(props)
2.2.222.05MNone2 μs
1_179.04x
stat_1
@paseri/paseri
Code snippetCode snippet
p.object(shape)
1.9.7161None2 μs
1_236.99x
stat_1
valibot
Code snippetCode snippet
v.object(entries)
1.5.013.37MNone2 μs
1_355.78x
stat_1
@railway-ts/pipelines
Code snippetCode snippet
object(schema)
0.1.29120None804 ns
3_645.66x
stat_1
typia (createValidate)
Code snippetCode snippet
typia.createValidate<TypiaSchema>()
14.0.6234.4KPrecompiled111 ns
26_399.1x
stat_2
typia (createIs)
Code snippetCode snippet
typia.createIs<TypiaSchema>()
14.0.6234.4KPrecompiled58 ns
50_463.23x
stat_3
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser
Code ligatures