Logo

Schema Benchmarks

Collapse
    • homeHome

    • timerInitialization
    • check_circleValidation
    • output_circleParsing

    • download_2Download
Expand sidebar
Benchmarkschevron_rightValidation

Checking if a given value matches the schema. This is different to parsing because it doesn't return a new value.

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

if (v.is(personSchema, data)) {
  // data is narrowed to Person
}
Data
check_circleValiderrorInvalid
Optimizations
flash_offNonecodeJITbuildPrecompiled
LibraryVersionOptimizationsMeanCompare
typia (createIs)
Code snippet
// const is = typia.createIs<TypiaSchema>();
is(data);

(Commented code is not benchmarked)

10.0.2Precompiled1 μs
typia (is)
Code snippet
typia.is<TypiaSchema>(data)
10.0.2Precompiled1 μs
1.07x
stat_minus_3
Created by eskimojo for Open Circle