Logo

Schema Benchmarks

Collapse
    • homeHome

    • timerInitialization
    • check_circleValidation
    • output_circleParsing

    • download_2Download
Expand sidebar
Benchmarkschevron_rightParsing

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

import * as v from "valibot";
import { personSchema } from "./schemas";

const person = v.parse(personSchema, data);
// person is of type Person
Data
check_circleValiderrorInvalid
Optimizations
flash_offNonecodeJITbuildPrecompiled
Abort early
errorAll errorswarningAbort early
LibraryVersionOptimizationsError typeMeanCompare
typia (createValidate)
Code snippet
// const validate = typia.createValidate<TypiaSchema>();
validate(data);

(Commented code is not benchmarked)

10.0.2PrecompiledAll errors1 μs
typia (validate)
Code snippet
typia.validate<TypiaSchema>(data)
10.0.2PrecompiledAll errors1 μs
1.05x
stat_minus_3
Created by eskimojo for Open Circle