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
Libraryarrow_upwardVersionDownloads (/wk)sortOptimizationsError typeMeansortCompare
@railway-ts/pipelines
Code snippetCode snippet
0.1.2998NoneAbort early677 ns
@railway-ts/pipelines
Code snippetCode snippet
0.1.2998NoneAll errors31 μs
45.64x
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
401.38x
stat_minus_2
@sapphire/shapeshift (run)
Code snippetCode snippet
4.0.0812.32KNoneAll errors273 μs
403.18x
stat_minus_2
arktype
Code snippetCode snippet
2.2.0833.25KJITAll errors98 μs
144.87x
stat_minus_1
ata-validator
Code snippetCode snippet
0.12.1748JITAll errors716 ns
1.06x
stat_minus_1
decoders
Code snippetCode snippet
2.9.344.56KNoneAll errors73 μs
108.25x
stat_minus_1
effect
Code snippetCode snippet
3.21.212.89MNoneAbort early9 μs
13.85x
stat_minus_1
effect
Code snippetCode snippet
3.21.212.89MNoneAll errors32 μs
46.9x
stat_minus_1
effect@beta
Code snippetCode snippet
4.0.0-beta.5912.89MNoneAbort early1 μs
1.66x
stat_minus_1
effect@beta
Code snippetCode snippet
4.0.0-beta.5912.89MNoneAll errors20 μs
29.13x
stat_minus_1
io-ts
Code snippetCode snippet
2.2.223MNoneAll errors6 μs
8.74x
stat_minus_1
joi
Code snippetCode snippet
18.1.219.41MNoneAbort early4 μs
5.99x
stat_minus_1
joi
Code snippetCode snippet
18.1.219.41MNoneAll errors63 μs
92.52x
stat_minus_1
runtypes
Code snippetCode snippet
7.0.4306.88KNoneAbort early192 μs
283.6x
stat_minus_2
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
306.11x
stat_minus_2
superstruct
Code snippetCode snippet
2.0.24.49MNoneAbort early10 μs
14.94x
stat_minus_1
superstruct
Code snippetCode snippet
2.0.24.49MNoneAll errors82 μs
120.77x
stat_minus_1
superstruct
Code snippetCode snippet
2.0.24.49MNoneAll errors84 μs
123.69x
stat_minus_1
superstruct (schema.validate)
Code snippetCode snippet
2.0.24.49MNoneAbort early10 μs
15.35x
stat_minus_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
11.96x
stat_minus_1
sury (compile + safe)
Code snippetCode snippet
11.0.0-alpha.4180.31KJITAll errors8 μs
11.7x
stat_minus_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
11.42x
stat_minus_1
sury (safe)
Code snippetCode snippet
11.0.0-alpha.4180.31KJITAll errors8 μs
12.16x
stat_minus_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
144.68x
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
132.37x
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
118.37x
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
125.35x
stat_minus_1
typia (createValidate)
Code snippetCode snippet
12.0.2291.57KPrecompiledAll errors7 μs
9.74x
stat_minus_1
typia (validate)
Code snippetCode snippet
12.0.2291.57KPrecompiledAll errors7 μs
10.07x
stat_minus_1
valibot
Code snippetCode snippet
1.3.19.37MNoneAbort early757 ns
1.12x
stat_minus_1
valibot
Code snippetCode snippet
1.3.19.37MNoneAll errors28 μs
42.08x
stat_minus_1
valibot (abortPipeEarly only)
Code snippetCode snippet
1.3.19.37MNoneAbort early28 μs
41.84x
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.89MNoneAbort early97 μs
142.74x
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
791.7x
stat_minus_3
zod
Code snippetCode snippet
4.4.1163.46MJITAll errors76 μs
112.89x
stat_minus_1
zod (jitless)
Code snippetCode snippet
4.4.1163.46MNoneAll errors81 μs
119.04x
stat_minus_1
zod/mini
Code snippetCode snippet
4.4.1163.46MJITAll errors66 μs
98.02x
stat_minus_1
zod/mini (jitless)
Code snippetCode snippet
4.4.1163.46MNoneAll errors66 μs
97.5x
stat_minus_1
zod/v3
Code snippetCode snippet
4.4.1163.46MNoneAll errors40 μs
58.49x
stat_minus_1
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser