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

  • 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
typia (createIs)
Code snippetCode snippet
const is = typia.createIs<TypiaSchema>();
is(data);

(Setup code is not benchmarked)

14.0.6242.17KPrecompiled56 ns
typia (is)
Code snippetCode snippet
typia.is<TypiaSchema>(data)
14.0.6242.17KPrecompiled87 ns
1.56x
stat_minus_1
zod-compiler (compact)
Code snippetCode snippet
compactSchema.is(data)
2.0.457.98KPrecompiled12 μs
220.01x
stat_minus_3
zod-compiler (bag)
Code snippetCode snippet
bagSchema.is(data)
2.0.457.98KPrecompiled16 μs
286.43x
stat_minus_3
zod-compiler
Code snippetCode snippet
schema.is(data)
2.0.457.98KPrecompiled16 μs
287.15x
stat_minus_3
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser
Code ligatures