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/ValidationValidation
github
GitHubGitHub
DiscordDiscord
PreferencesPreferences

Checking if a given value matches the schema. This is different to parsing because it doesn't return a new value.

Copy to clipboardCopy to clipboard
import * as v from "valibot"; import { personSchema } from "./schemas"; if (v.is(personSchema, data)) { // data is narrowed to Person }
Data
  • errorInvalid
  • check_circleValid
Optimizations
  • flash_offNone
  • codeJIT
  • buildPrecompiled
LibrarysortVersiondownload/wksortOptimizationsMeanarrow_upwardCompare
zod-compiler (compact)
Code snippetCode snippet
compactSchema.is(data)
2.0.7n/aPrecompiled872 ns
zod-compiler (bag)
Code snippetCode snippet
bagSchema.is(data)
2.0.7n/aPrecompiled886 ns
1.02x
stat_minus_1
zod-compiler
Code snippetCode snippet
schema.is(data)
2.0.7n/aPrecompiled890 ns
1.02x
stat_minus_1
typia (createIs)
Code snippetCode snippet
const is = typia.createIs<TypiaSchema>();
is(data);

(Setup code is not benchmarked)

15.1.0n/aPrecompiled4 μs
4.28x
stat_minus_3
typia (is)
Code snippetCode snippet
typia.is<TypiaSchema>(data)
15.1.0n/aPrecompiled4 μs
4.41x
stat_minus_3
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser
Code ligatures