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)sortOptimizationsError typeMeanarrow_upwardCompare
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
@sapphire/shapeshift (run)
Code snippetCode snippet
4.0.0812.32KNoneAll errors273 μs
1.96x
stat_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
1.97x
stat_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.59x
stat_1
runtypes
Code snippetCode snippet
7.0.4306.88KNoneAbort early192 μs
2.79x
stat_1
arktype
Code snippetCode snippet
2.2.0833.25KJITAll errors98 μs
5.46x
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
5.47x
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
5.55x
stat_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
5.98x
stat_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
6.32x
stat_1
superstruct
Code snippetCode snippet
2.0.24.49MNoneAll errors84 μs
6.4x
stat_1
superstruct
Code snippetCode snippet
2.0.24.49MNoneAll errors82 μs
6.56x
stat_1
zod (jitless)
Code snippetCode snippet
4.4.1163.46MNoneAll errors81 μs
6.65x
stat_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
6.69x
stat_1
zod
Code snippetCode snippet
4.4.1163.46MJITAll errors76 μs
7.01x
stat_1
decoders
Code snippetCode snippet
2.9.344.56KNoneAll errors73 μs
7.31x
stat_1
zod/mini
Code snippetCode snippet
4.4.1163.46MJITAll errors66 μs
8.08x
stat_1
zod/mini (jitless)
Code snippetCode snippet
4.4.1163.46MNoneAll errors66 μs
8.12x
stat_1
joi
Code snippetCode snippet
18.1.219.41MNoneAll errors63 μs
8.56x
stat_1
zod/v3
Code snippetCode snippet
4.4.1163.46MNoneAll errors40 μs
13.54x
stat_1
effect
Code snippetCode snippet
3.21.212.89MNoneAll errors32 μs
16.88x
stat_1
@railway-ts/pipelines
Code snippetCode snippet
0.1.2998NoneAll errors31 μs
17.35x
stat_1
valibot
Code snippetCode snippet
1.3.19.37MNoneAll errors28 μs
18.81x
stat_1
valibot (abortPipeEarly only)
Code snippetCode snippet
1.3.19.37MNoneAbort early28 μs
18.92x
stat_1
effect@beta
Code snippetCode snippet
4.0.0-beta.5912.89MNoneAll errors20 μs
27.17x
stat_1
superstruct (schema.validate)
Code snippetCode snippet
2.0.24.49MNoneAbort early10 μs
51.57x
stat_1
superstruct
Code snippetCode snippet
2.0.24.49MNoneAbort early10 μs
52.97x
stat_1
effect
Code snippetCode snippet
3.21.212.89MNoneAbort early9 μs
57.14x
stat_1
sury (safe)
Code snippetCode snippet
11.0.0-alpha.4180.31KJITAll errors8 μs
65.13x
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
66.17x
stat_1
sury (compile + safe)
Code snippetCode snippet
11.0.0-alpha.4180.31KJITAll errors8 μs
67.67x
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
69.33x
stat_1
typia (validate)
Code snippetCode snippet
12.0.2291.57KPrecompiledAll errors7 μs
78.61x
stat_1
typia (createValidate)
Code snippetCode snippet
12.0.2291.57KPrecompiledAll errors7 μs
81.29x
stat_1
io-ts
Code snippetCode snippet
2.2.223MNoneAll errors6 μs
90.53x
stat_1
joi
Code snippetCode snippet
18.1.219.41MNoneAbort early4 μs
132.16x
stat_1
effect@beta
Code snippetCode snippet
4.0.0-beta.5912.89MNoneAbort early1 μs
476.75x
stat_2
valibot
Code snippetCode snippet
1.3.19.37MNoneAbort early757 ns
707.97x
stat_3
ata-validator
Code snippetCode snippet
0.12.1748JITAll errors716 ns
748.2x
stat_3
@railway-ts/pipelines
Code snippetCode snippet
0.1.2998NoneAbort early677 ns
791.7x
stat_3
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser