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
Expand sidebarExpand sidebar
Benchmarks/ParsingParsing
github
GitHubGitHub
DiscordDiscord
PreferencesPreferences

Parsing a value to match the schema. This is different to validation because it returns a new value.

Copy to clipboardCopy to clipboard
import * as v from "valibot"; import { personSchema } from "./schemas"; const person = v.parse(personSchema, data); // person is of type Person
Data
errorInvalidcheck_circleValid
Optimizations
flash_offNonecodeJITbuildPrecompiled
Abort early
errorAll errorswarningAbort early
LibrarysortVersionDownloads (/wk)arrow_upwardOptimizationsError typeMeansortCompare
zod
Code snippetCode snippet
4.4.1163.46MJITAll errors76 μs
zod (jitless)
Code snippetCode snippet
4.4.1163.46MNoneAll errors81 μs
1.05x
stat_minus_1
zod/mini
Code snippetCode snippet
4.4.1163.46MJITAll errors66 μs
1.15x
stat_1
zod/mini (jitless)
Code snippetCode snippet
4.4.1163.46MNoneAll errors66 μs
1.16x
stat_1
zod/v3
Code snippetCode snippet
4.4.1163.46MNoneAll errors40 μs
1.93x
stat_1
joi
Code snippetCode snippet
18.1.219.41MNoneAbort early4 μs
18.84x
stat_1
joi
Code snippetCode snippet
18.1.219.41MNoneAll errors63 μs
1.22x
stat_1
effect
Code snippetCode snippet
3.21.212.89MNoneAbort early9 μs
8.15x
stat_1
effect
Code snippetCode snippet
3.21.212.89MNoneAll errors32 μs
2.41x
stat_1
effect@beta
Code snippetCode snippet
4.0.0-beta.5912.89MNoneAbort early1 μs
67.98x
stat_2
effect@beta
Code snippetCode snippet
4.0.0-beta.5912.89MNoneAll errors20 μs
3.87x
stat_1
yup
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
1.7.110.89MNoneAbort early97 μs
1.26x
stat_minus_1
yup
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
1.7.110.89MNoneAll errors536 μs
7.01x
stat_minus_1
valibot
Code snippetCode snippet
1.3.19.37MNoneAbort early757 ns
100.95x
stat_3
valibot
Code snippetCode snippet
1.3.19.37MNoneAll errors28 μs
2.68x
stat_1
valibot (abortPipeEarly only)
Code snippetCode snippet
1.3.19.37MNoneAbort early28 μs
2.7x
stat_1
superstruct
Code snippetCode snippet
2.0.24.49MNoneAbort early10 μs
7.55x
stat_1
superstruct
Code snippetCode snippet
2.0.24.49MNoneAll errors82 μs
1.07x
stat_minus_1
superstruct
Code snippetCode snippet
2.0.24.49MNoneAll errors84 μs
1.1x
stat_minus_1
superstruct (schema.validate)
Code snippetCode snippet
2.0.24.49MNoneAbort early10 μs
7.35x
stat_1
typebox
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
1.1.343.74MJITAll errors98 μs
1.28x
stat_minus_1
typebox (compile)
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
1.1.343.74MJITAll errors90 μs
1.17x
stat_minus_1
typebox (schema compile)
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
1.1.343.74MJITAll errors80 μs
1.05x
stat_minus_1
typebox (schema)
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
1.1.343.74MJITAll errors85 μs
1.11x
stat_minus_1
io-ts
Code snippetCode snippet
2.2.223MNoneAll errors6 μs
12.91x
stat_1
arktype
Code snippetCode snippet
2.2.0833.25KJITAll errors98 μs
1.28x
stat_minus_1
@sapphire/shapeshift
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
4.0.0812.32KNoneAll errors272 μs
3.56x
stat_minus_1
@sapphire/shapeshift (run)
Code snippetCode snippet
4.0.0812.32KNoneAll errors273 μs
3.57x
stat_minus_1
runtypes
Code snippetCode snippet
7.0.4306.88KNoneAbort early192 μs
2.51x
stat_minus_1
runtypes
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
7.0.4306.88KNoneAbort early207 μs
2.71x
stat_minus_1
typia (createValidate)
Code snippetCode snippet
12.0.2291.57KPrecompiledAll errors7 μs
11.59x
stat_1
typia (validate)
Code snippetCode snippet
12.0.2291.57KPrecompiledAll errors7 μs
11.21x
stat_1
sury
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
11.0.0-alpha.4180.31KJITAll errors8 μs
9.43x
stat_1
sury (compile + safe)
Code snippetCode snippet
11.0.0-alpha.4180.31KJITAll errors8 μs
9.65x
stat_1
sury (compile)
Code snippetCode snippet
Throws on invalid dataThrows on invalid data
This library throws an error when parsing invalid data (and has no non-throwing equivalent), so the benchmark includes a try/catch.
11.0.0-alpha.4180.31KJITAll errors8 μs
9.89x
stat_1
sury (safe)
Code snippetCode snippet
11.0.0-alpha.4180.31KJITAll errors8 μs
9.29x
stat_1
decoders
Code snippetCode snippet
2.9.344.56KNoneAll errors73 μs
1.04x
stat_1
ata-validator
Code snippetCode snippet
0.12.1748JITAll errors716 ns
106.68x
stat_3
@railway-ts/pipelines
Code snippetCode snippet
0.1.2998NoneAbort early677 ns
112.89x
stat_3
@railway-ts/pipelines
Code snippetCode snippet
0.1.2998NoneAll errors31 μs
2.47x
stat_1
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser