Benchmarks
The rule the headline and the homepage's board follow, every result behind it, our own benchmark beside it and how to rerun each one.
Every number on this site comes from a benchmark in the repo. This page has the rule the headline and the homepage's board follow, every result behind it, our own benchmark beside it and the commands that rerun each one.
The rule
The headline, the homepage's board and the tables below follow one rule, the same for validation speed, startup and bundle size.
Ranked by geometric mean across other projects' public benchmarks and valibot.dev's login form, which we wrote in each library from Valibot's code: 22 results for validation speed, 2 for startup and 2 for bundle size; the 2 startup results time creating a schema. Each category averages the largest set of results that ArkType, Zod and three more named libraries all ran, in the unit they measure, and ranks every library that ran all of them, in plain order. ArkType is its default precompiled build in all three. We name only libraries with 100k+ npm downloads a week; every place and average counts all of them.
So the headline's words mean these averages, each the first row of a table below:
- Smallest on average across valibot.dev's login form and schemabenchmarks.dev's download: 1.19 kB gzipped against Typia's 1.52 kB, 21.7% lower.
- Fastest on average across 22 results from 2 independent benchmarks: 658 CPU instructions per validation against Typia's 2,097, 68.6% lower.
- Quickest to start on average across 2 results from 2 independent benchmarks: 38 CPU instructions to create a schema against TypeBox's 4,273, 99.1% lower.
When each benchmark was measured has a date per benchmark.
Each choice has a reason:
- Other projects' benchmarks, because we didn't write them. Each is another project's public suite, cloned at a pinned commit and run as its authors wrote it, with ArkType added the way that suite adds a library. We chose none of their schemas, inputs or measurements. The one exception is in size: valibot.dev's login form is Valibot's code, which we wrote in each other library and size with our own script.
- The largest set of results that five libraries share, because a library is only compared over results it ran. A graph has five lanes: ArkType, Zod and three more libraries the site names. It averages the largest set of results that ArkType, Zod and three such libraries all ran, so every bar is over the same work. Which results those are depends on who ran what and never on what anyone scored.
- A geometric mean, because the results span orders of magnitude: one validates an email address, another a whole document. An arithmetic mean would be the largest result with the rest as rounding error. A geometric mean gives every result the same weight, and the ratio of two libraries' means is the mean of their ratios.
- The unit the benchmark measures. Speed and startup are CPU instructions, counted with
perfwhile the other project's benchmark code runs. An instruction count is the same on a busy machine and on a quiet one, and close to the same on another CPU, so a number here can be checked on a machine that isn't ours. Size is bytes, minified and gzipped. - One build of ArkType in all three, because a library that is fastest in one configuration and smallest in another is neither at once. Every row of every graph is the same build: precompiled with the default options, bundled for production.
- Plain order. A place is a library's position by its mean, lowest first, among every library that ran all of a graph's results, whether the site names it or not. Nothing counts as a tie unless two means are equal.
- Startup counts creating a schema, because that is what both public startup benchmarks time. A precompiled validator creates its schema when it builds and has nothing left to create when it loads; the graph shows that difference as it was measured. Importing a real app through its first validation is our own startup benchmark.
The lanes the homepage draws are ArkType, the three best-placed other libraries the site names (100k+ npm downloads a week) and Zod. Zod's other entry points, z.compile and Zod Mini, are in the tables below rather than in a second Zod lane.
- Every benchmark is public. We wrote 1 of the 5 for validation speed, 2 of the 4 for startup and 1 of the 4 for bundle size; the averages above leave those out. They keep valibot.dev's login form, Valibot's code, which we wrote in each library and size with our own script.
- Each of the 2 independent startup results times creating a schema, which a precompiled build does when it builds. Our own startup benchmarks time importing an app through its first validation (7 results).
The results
Each table has every library its graph ranks, then every result the graph averages, so where another library has the better number on one result, that number is here.
Validation speed
CPU instructions per validation · 22 results from 2 other projects' benchmarks.
| Place | Library | CPU instructions per validation | Our benchmark, ns per validation |
|---|---|---|---|
| 1st | ArkType | 658 | 123 ns |
| 2nd | Typia | 2,097 | 794 ns |
| 3rd | Valibot | 5,647 | 1,875 ns |
| 4th | TypeBox | 7,832 | 3,207 ns |
| 5th | Zod | 10,044 | 2,012 ns |
Every result the graph averages:
| Benchmark | Result | ArkType | Typia | Valibot | TypeBox | Zod |
|---|---|---|---|---|---|---|
| schemabenchmarks.dev | parsing invalid | 161 | 113k | 4,648 | 98,596 | 120k |
| schemabenchmarks.dev | parsing valid | 5,984 | 16,791 | 72,595 | 9,787 | 59,823 |
| schemabenchmarks.dev | string email valid | 647 | 772 | 1,009 | 8,796 | 1,150 |
| schemabenchmarks.dev | string url valid | 755 | 1,694 | 1,670 | 9,310 | 2,268 |
| schemabenchmarks.dev | string uuid valid | 526 | 1,363 | 1,713 | 9,299 | 1,480 |
| schemabenchmarks.dev | string ipv4 valid | 230 | 411 | 821 | 8,354 | 727 |
| schemabenchmarks.dev | string ipv6 valid | 811 | 3,240 | 1,179 | 8,777 | 4,263 |
| schemabenchmarks.dev | string email invalid | 372 | 406 | 1,350 | 4,487 | 4,733 |
| schemabenchmarks.dev | string uuid invalid | 23 | 223 | 1,194 | 4,263 | 4,411 |
| schemabenchmarks.dev | string url invalid | 371 | 223 | 1,828 | 4,895 | 1,724 |
| schemabenchmarks.dev | string ipv4 invalid | 43 | 240 | 1,183 | 4,262 | 4,440 |
| schemabenchmarks.dev | string ipv6 invalid | 47 | 1,704 | 1,361 | 4,663 | 957 |
| schemabenchmarks.dev | validation valid | 5,943 | 16,694 | 73,558 | 9,683 | 60,338 |
| schemabenchmarks.dev | validation invalid | 29 | 68 | 4,490 | 159 | 11,883 |
| ata's validator-benchmarks | verdict-valid, user | 934 | 1,336 | 5,722 | 1,464 | 6,652 |
| ata's validator-benchmarks | verdict-valid, order | 5,451 | 12,495 | 55,435 | 14,984 | 56,695 |
| ata's validator-benchmarks | verdict-invalid, user | 748 | 1,348 | 4,882 | 1,400 | 17,300 |
| ata's validator-benchmarks | verdict-invalid, order | 1,832 | 4,312 | 26,369 | 5,117 | 71,782 |
| ata's validator-benchmarks | errors-invalid, user | 4,347 | 6,567 | 29,183 | 19,682 | 26,855 |
| ata's validator-benchmarks | errors-invalid, order | 11,997 | 26,273 | 62,267 | 209k | 90,019 |
| ata's validator-benchmarks | blocked-verdict-valid, user | 934 | 1,336 | 5,720 | 4,928 | 9,900 |
| ata's validator-benchmarks | blocked-verdict-valid, order | 5,453 | 12,485 | 55,422 | 93,706 | 104k |
Not averaged: 21 more public results, from moltar's typescript-runtime-type-benchmarks, schemabenchmarks.dev, Sury's schema benchmark and ata's validator-benchmarks. No set larger than these 22 was run in full by ArkType, Zod and three more libraries the site names.
Startup
CPU instructions to create a schema · 2 results from 2 other projects' benchmarks.
| Place | Library | CPU instructions to create a schema | Our apps, import to first validation |
|---|---|---|---|
| 1st | ArkType | 38 | 3.90 ms |
| 2nd | TypeBox | 4,273 | 22.9 ms |
| 3rd | Valibot | 14,801 | 3.89 ms |
| 4th | sury | 119k | — |
| 5th | Zod | 895k | 16.2 ms |
| 6th | Zod (compiled) | 1.18M | 17.5 ms |
Each library on each result, including the ones that only ran one:
| Library | schemabenchmarks.dev's initialization | Sury's build and parse once | Geometric mean | Place |
|---|---|---|---|---|
| ArkType | 16 | 91 | 38 | 1st |
| TypeBox | 119k | 153 | 4,273 | 2nd |
| Valibot | 23,353 | 9,381 | 14,801 | 3rd |
| sury | 70,501 | 201k | 119k | 4th |
| Zod | 878k | 913k | 895k | 5th |
| Zod (compiled) | 2.46M | 563k | 1.18M | 6th |
| @sapphire/shapeshift | 574k | — | — | — |
| ajv | 20 | — | — | — |
| Effect Schema | 176k | — | — | — |
| io-ts | 29,722 | — | — | — |
| Joi | 1.14M | — | — | — |
| Superstruct | 42,192 | — | — | — |
| runtypes | 11.8M | — | — | — |
| Typia | 298 | — | — | — |
| Yup | 1.03M | — | — | — |
| Zod Mini | 750k | — | — | — |
| Zod 3 | 507k | — | — | — |
Bundle size
kB gzipped · valibot.dev's login form and schemabenchmarks.dev's download.
| Place | Library | kB gzipped |
|---|---|---|
| 1st | ArkType | 1.19 kB |
| 2nd | Typia | 1.52 kB |
| 3rd | ajv | 1.59 kB |
| 4th | Superstruct | 1.77 kB |
| 5th | Valibot | 1.79 kB |
| 6th | runtypes | 4.94 kB |
| 7th | Zod Mini | 5.91 kB |
| 8th | Yup | 13.3 kB |
| 9th | TypeBox | 17.6 kB |
| 10th | Zod | 24.7 kB |
| 11th | Effect Schema | 44.6 kB |
| 12th | Joi | 53.8 kB |
Each library on each result, including the ones that only ran one:
| Library | valibot.dev's login form | schemabenchmarks.dev's download | Geometric mean | Place | Not averaged: Sury's schema bundled as a check |
|---|---|---|---|---|---|
| ArkType | 0.92 kB | 1.55 kB | 1.19 kB | 1st | 0.27 kB |
| Typia | 1.25 kB | 1.85 kB | 1.52 kB | 2nd | — |
| ajv | 0.94 kB | 2.72 kB | 1.59 kB | 3rd | — |
| Superstruct | 1.62 kB | 1.94 kB | 1.77 kB | 4th | — |
| Valibot | 1.56 kB | 2.06 kB | 1.79 kB | 5th | 1.20 kB |
| runtypes | 5.05 kB | 4.83 kB | 4.94 kB | 6th | — |
| Zod Mini | 5.12 kB | 6.82 kB | 5.91 kB | 7th | — |
| Yup | 13.5 kB | 13.1 kB | 13.3 kB | 8th | — |
| TypeBox | 22.8 kB | 13.6 kB | 17.6 kB | 9th | 0.21 kB |
| Zod | 25.1 kB | 24.3 kB | 24.7 kB | 10th | 64.7 kB |
| Effect Schema | 83.2 kB | 23.9 kB | 44.6 kB | 11th | — |
| Joi | 54.7 kB | 52.9 kB | 53.8 kB | 12th | — |
| io-ts | — | 3.62 kB | — | — | — |
| sury | — | 15.8 kB | — | — | 11.6 kB |
| Zod (compiled) | — | 15.6 kB | — | — | — |
| Zod 3 | — | 13.1 kB | — | — | — |
| @sapphire/shapeshift | — | 25.3 kB | — | — | — |
Not averaged: 1 more public result, from Sury's schema bundled as a check. No set larger than these two was run in full by ArkType, Zod and three more libraries the site names.
Every library's result on every row, in every suite, is in leaderboard.json.
When each was measured
| Benchmark | On the board | Other libraries last measured | ArkType at |
|---|---|---|---|
| schemabenchmarks.dev | 14 speed results | November 19, 2026 | 591cc38d7 |
| ata's validator-benchmarks | 8 speed results | November 19, 2026 | 591cc38d7 |
| schemabenchmarks.dev's initialization | 1 startup result | November 19, 2026 | 591cc38d7 |
| Sury's build and parse once | 1 startup result | November 19, 2026 | 591cc38d7 |
| valibot.dev's login form | 1 size result | November 19, 2026 | 591cc38d7 |
| schemabenchmarks.dev's download | 1 size result | November 19, 2026 | 591cc38d7 |
A result is only as current as its last run, so each benchmark has its own date, and ArkType's rows name the commit they were measured at. Each month a job reruns the size benchmarks at each library's newest release and opens a pull request with the updated numbers for review, so a number on this site changes only by a reviewed commit.
Our own benchmark
The rule leaves our own benchmark out of every bar, place and superlative, since we wrote it. The homepage prints two figures from it beside the bars, in units most people think in, and the sections below have all of it, including the results where another library is ahead.
Validation speed
Nanoseconds per validation, by the clock, on one core. Each library's geometric mean over the scenarios all of them ran:
| Place | Library | ns per validation, geometric mean of 27 scenarios | Validations a second |
|---|---|---|---|
| 1st | ArkType | 123 ns | 8.1M |
| 2nd | ajv | 187 ns | 5.3M |
| 3rd | ArkType (dynamic) | 272 ns | 3.7M |
| 4th | Typia | 794 ns | 1.3M |
| 5th | Zod (compiled) | 935 ns | 1.1M |
| 6th | Valibot | 1,875 ns | 533k |
| 7th | Zod | 2,012 ns | 497k |
| 8th | TypeBox | 3,207 ns | 312k |
| 9th | Zod Mini | 4,219 ns | 237k |
Precompiled ArkType was faster than Zod 4 in all 32 scenarios of our benchmark, by a median of 15×, and faster than Zod 4's z.compile in 32 of 32, by a median of 5.3×. It isn't the fastest at everything. On the rows that report errors for invalid data, ajv was faster on 8 of 15.
Each panel is one scenario, and the table under them has every one:
- ArkType4.84 ns1×
- ArkTypedynamic4.33 ns1.11× faster
- typiaaot8.25 ns1.71×
- TypeBoxaot99.5 ns20×
- ajvaot14.4 ns2.9×
- Zod 4copies143 ns29×
- Zod 4compiled· copies16.8 ns3.4×
- Valibotcopies477 ns98×
- ArkType323 ns1×
- ArkTypedynamic326 ns≈ tie
- typiaaot2.62 µs8.1×
- TypeBoxaot1.4 µs4.3×
- ajvaot1.09 µs3.3×
- Zod 4copies5.73 µs17×
- Zod 4compiled· copies1.34 µs4.1×
- Valibotcopies6.32 µs19×
- ArkType13 ns1×
- ArkTypedynamic13.6 ns1.05×
- typiaaot460 ns35×
- TypeBoxaot7.66 µs590×
- ajvaot611 ns47×
- Zod 4140 ns10×
- Zod 4compiled17.9 ns1.38×
- Valibot468 ns36×
- ArkType650 ns1×
- ArkTypedynamic644 ns≈ tie
- typiaaot4.15 µs6.3×
- TypeBoxaot41.1 µs63×
- ajvaot2.82 µs4.3×
- Zod 45.7 µs8.7×
- Zod 4compiled1.32 µs2×
- Valibot6.3 µs9.6×
- ArkType4.5 ns1×
- ArkTypedynamic4.46 ns≈ tie
- typiaaot13.3 ns2.9×
- TypeBoxaot10.2 ns2.2×
- ajvaot12.1 ns2.6×
- Zod 4copies96.6 ns21×
- Zod 4compiled· copies16.5 ns3.6×
- Valibotcopies437 ns97×
- ArkType214 ns1×
- ArkTypedynamic224 ns1.05×
- typiaaot2.3 µs10×
- TypeBoxaot363 ns1.69×
- ajvaot914 ns4.2×
- Zod 4copies8.81 µs41×
- Zod 4compiled*· copies8.82 µs41×
- Valibotcopies5.34 µs25×
- ArkType53 ns1×
- ArkTypedynamic52.2 ns1.01× faster
- typiaaot177 ns3.3×
- TypeBoxaot71.8 ns1.36×
- ajvaot70.1 ns1.32×
- Zod 4copies551 ns10×
- Zod 4compiled· copies70.8 ns1.34×
- Valibotcopies465 ns8.7×
- ArkType293 ns1×
- ArkTypedynamic277 ns1.05× faster
- typiaaot320 ns1.09×
- TypeBoxaot371 ns1.26×
- ajvaot491 ns1.67×
- Zod 4copies4.2 µs14×
- Zod 4compiled· copies731 ns2.5×
- Valibotcopies16 µs54×
- ArkType101 ns1×
- ArkTypedynamic1.19 µs11×
- typiaaot518 ns5.1×
- TypeBoxaot9.84 µs97×
- ajvaot30.8 ns3.2× faster
- Zod 41.91 µs19×
- Zod 4compiled1.68 µs16×
- Valibot750 ns7.4×
- ArkType2.26 µs1×
- ArkTypedynamic10.3 µs4.5×
- typiaaot14.8 µs6.5×
- TypeBoxaot67.8 µs30×
- ajvaot1.35 µs1.66× faster
- Zod 419.3 µs8.5×
- Zod 4compiled17.9 µs7.9×
- Valibot10 µs4.4×
- ArkType70.6 ns1×
- ArkTypedynamic*10.2 µs145×
- typiaaot6.21 µs87×
- TypeBoxaot6.69 µs94×
- ajvaot29 ns2.4× faster
- Zod 4*20.6 µs292×
- Zod 4compiled*16.6 µs235×
- Valibot390 ns5.5×
all 16 valid-data scenarios: 15 faster, 0 tied, 1 slower than the fastest other library · every one is in the table below
Beyond it:
- On moltar's parseSafe benchmark, precompiled ArkType takes the fewest instructions per call, and by wall clock it was faster than each of the six libraries closest to it, Typia among them, in at least 28 of 30 paired runs.
- On apps we generated of 11 to 1,012 Types, built with esbuild, webpack and Next on Turbopack, the default build validated faster on every one than every other library measured on it (Zod 4 and Valibot on every app, z.compile and ajv on some), by 1.68x or more: nanoseconds per call over 9 paired runs on a shared machine, p ≤ 0.039.
- On ntwine's packages/shared, the schemas of an open-source app and the code that reads them, bundled with esbuild: the "smallest" preset shipped 129 KB gzipped to Zod 4's 191 KB and Zod 3's 111 KB, the version ntwine ships; it ran 0.205G instructions through its first validation to Zod 4's 0.481G and Zod 3's 0.270G; and the default build validated a thread 11.89x as fast as Zod 4 and 41.17x as fast as Zod 3, in nanoseconds per call over 9 paired runs on a shared machine, p ≤ 0.004. Zod 4 ships less through webpack (119 KB to 125 KB) and through Next on Turbopack (276 KB to 277 KB).
Startup
From just before a fresh process imports an app's bundle to just after its first validation returns. In CPU instructions, beyond what an empty module costs to load:
| Library | form | login | moltar | shop | Geometric mean of login, moltar, shop | Place |
|---|---|---|---|---|---|---|
| ArkType | 819k | 687k | 940k | 9.36M | 1.82M | 1st |
| Valibot | 2.48M | 2.35M | 2.29M | 12.3M | 4.04M | 2nd |
| ajv | — | 1.87M | 1.61M | 32.9M | 4.63M | 3rd |
| Typia | — | 2.45M | 1.34M | 33.4M | 4.78M | 4th |
| Zod Mini | 11.5M | 11.4M | 10.5M | 37.0M | 16.4M | 5th |
| Zod | 44.1M | 43.7M | 54.0M | 102M | 62.3M | 6th |
| Zod (compiled) | 52.4M | 51.6M | 58.6M | 126M | 72.5M | 7th |
| TypeBox | — | 87.9M | 89.4M | 208M | 118M | 8th |
- On each of the 4 apps in our startup benchmark, precompiled ArkType's default build ran fewer instructions from import through its first validation than every other library measured on it (Valibot, Zod, Zod (compiled), Zod Mini, Typia, ajv and TypeBox), by 23.8% or more, in at least 17 of 20 paired runs on Node 24.
- From import through its first validation, the "smallest" preset ran fewer instructions than every other library on every one of those apps, by 2.8% or more through esbuild and webpack and by 2.4% or more on Turbopack, where Next's own startup is in every count, p ≤ 0.004; the default build did on 19 of them.
The same apps by the clock, in milliseconds, which the homepage prints beside its startup bars:
| Library | login | moltar | shop | Geometric mean | Place |
|---|---|---|---|---|---|
| Valibot | 3.32 ms | 3.36 ms | 5.27 ms | 3.89 ms | 1st |
| ArkType | 3.34 ms | 3.07 ms | 5.79 ms | 3.90 ms | 2nd |
| Typia | 3.26 ms | 3.15 ms | 8.04 ms | 4.35 ms | 3rd |
| ajv | 3.20 ms | 3.01 ms | 8.62 ms | 4.36 ms | 4th |
| Zod Mini | 5.35 ms | 5.15 ms | 10.8 ms | 6.68 ms | 5th |
| Zod | 12.2 ms | 13.7 ms | 25.3 ms | 16.2 ms | 6th |
| Zod (compiled) | 13.1 ms | 13.5 ms | 30.3 ms | 17.5 ms | 7th |
| TypeBox | 16.8 ms | 16.5 ms | 43.3 ms | 22.9 ms | 8th |
| ArkType (dynamic) | 31.7 ms | 29.9 ms | 50.6 ms | 36.3 ms | 9th |
Most of each of those milliseconds is Node loading a module, which every library pays alike, so the quickest are close together and their order changes from app to app and from machine to machine. Instructions count what a library adds, and a busy machine doesn't move them.
Against dynamic ArkType
On valid data, the precompiled build is within 6% of dynamic ArkType in 14 of 16 scenarios; it's 1.11× slower on moltar and 1.45× faster on rotating. The bigger change is everything before the first call.
| Precompiled | Dynamic | |
|---|---|---|
| Cold start, our login form app | 3.34 ms | 31.7 ms |
| Bundle gzipped, valibot.dev's login form | 0.92 kB | 98.1 kB |
Cold start is our login form app (an email and a password check), bundled and minified with esbuild: the median time for a fresh Node process to import the bundle and validate once, measured 2026-10-23 at 89510709d. Size is valibot.dev's login form, the validators and the library code they import, minified with esbuild and gzipped, at 591cc38d7.
Bundle size
Our own apps, each bundled with esbuild as a production build, minified and gzipped:
| Library | login | moltar | shop | saas | Geometric mean of login, moltar, shop | Place |
|---|---|---|---|---|---|---|
| ajv | 0.63 kB | 0.76 kB | 8.84 kB | — | 1.61 kB | 1st |
| ArkType | 1.14 kB | 1.19 kB | 5.07 kB | 9.59 kB | 1.90 kB | 2nd |
| Valibot | 1.68 kB | 1.46 kB | 3.63 kB | 5.17 kB | 2.07 kB | 3rd |
| Typia | 1.24 kB | 1.23 kB | 16.7 kB | — | 2.94 kB | 4th |
| Zod Mini | 5.11 kB | 4.71 kB | 10.2 kB | — | 6.26 kB | 5th |
| Zod | 25.1 kB | 26.4 kB | 28.1 kB | — | 26.5 kB | 6th |
| Zod (compiled) | 32.9 kB | 34.2 kB | 35.9 kB | — | 34.3 kB | 7th |
| TypeBox | 41.9 kB | 41.9 kB | 42.9 kB | — | 42.2 kB | 8th |
On Valibot's own login form, ArkType's default build reports an error for every invalid field, with the form's messages, in a smaller bundle than Valibot: 0.92 kB gzipped against 1.56 kB. Dynamic ArkType is 98.1 kB gzipped, minified with esbuild, up from 47.8 kB in 2.2.9, so precompile to ship less.
With the "smallest" preset, its bundle was smaller than every other library's on 20 of those 22 apps, by 31 B or more; on 11 and 46 Types through webpack with narrows, Valibot's was smaller, by up to 29 B (0.6%). It shipped less than Zod 4 on every one, by 1.18x to 10.28x. The default build, the fastest, shipped 1.25x to 2.48x what "smallest" did.
Size at scale has how each build's bundle grows with the number of Types in it, and where each is the smallest.
Build time
Build time has what precompiling adds to a production build, a dev server and a rebuild.
Precompiled against dynamic
A precompiled validator has to return what dynamic ArkType returns, with the same messages. These are the checks every change to the precompiler passes:
| Check | What it holds |
|---|---|
pnpm testDifferential | Every Type ArkType's own test suites call, precompiled in each layout, returns what dynamic ArkType returns on every input the suites passed it. |
pnpm testPerturbation | Change what the build read before the program runs, like a key, an export or a prototype: the precompiled program throws as it starts or still agrees with ArkType. |
pnpm testPrograms | Generated programs agree run as written and precompiled, unchanged and under every perturbation. |
pnpm testPruneParity | A production bundle missing what no code reads validates every input as one built whole does, once negative controls show the check catches a dropped check. |
pnpm testHistory | Each test sees the same thing fresh, twice in one process and after a random sample of the others. |
pnpm testEnvironments | A program prints the same in other time zones and locales, on Bun, Deno, Chromium and Firefox. |
In your own project, shadow mode runs your tests against both and fails wherever they disagree.
Rerun them
Clone the repo and build it once:
git clone https://github.com/arktypeio/arktype
cd arktype
pnpm i && pnpm buildThe board
pnpm benchExternal <suite> clones a benchmark at the commit its published rows were counted on, installs it from its own lockfile, adds ArkType and runs it. Pass --newest (e.g. pnpm benchExternal size --newest) to measure against the newest rival releases shown on the published board. The clones take about 4.5 GB under ark/repo/bench/external/out/clones/.
| Graph | Command | Needs | Takes |
|---|---|---|---|
| Validation speed | pnpm benchExternal sb and pnpm benchExternal ata | Linux, perf, taskset | about 75 minutes |
| Startup | pnpm benchExternal sb and pnpm benchExternal sury | Linux, perf, taskset | about 50 minutes |
| Bundle size | pnpm benchExternal size | any OS | about 2 minutes |
| All of them | pnpm benchExternal all | Linux, perf, taskset | about 90 minutes |
Instruction counts come from hardware counters, which perf reads on Linux and which most hosted CI runners and virtual machines don't expose. NODE24 and NODE26 name the Node 24 and 26 binaries the suites run on; without them the suites run on the Node that runs the script.
Each run writes its results to ark/repo/bench/external/out/fresh/. Then:
pnpm benchBoard --freshprints each graph's standings by the rule above, the published numbers beside what your checkout measured. Without --fresh it prints the published ones alone. It runs the code this site runs, so what it prints for the published results is what the homepage draws.
Expect every other library's bundle to match to the byte, and an instruction count to move by a few percent on another CPU or Node build while the ratios between libraries move less. ArkType's own rows are the commit you check out, and the published ones name theirs.
Our own benchmark
| Script | What it reruns | Needs | Takes |
|---|---|---|---|
pnpm benchTypia | Typia's generated validators, which the next three read | any OS | 1 to 5 minutes |
pnpm benchValidate | Validation speed, every scenario | any OS | about 10 minutes |
pnpm benchImport | Startup by the clock | any OS | under a minute |
pnpm benchSize | Bundle size of our apps | any OS | seconds |
pnpm benchExternal startup | Startup in instructions | Linux, perf, taskset | about a minute |
benchValidate, benchImport and benchSize write validate.json, import.json and size.json to ark/repo/bench/out/, and pnpm benchBoard --fresh prints them beside the published tables above. Times by the clock are your machine's: compare the ratios between libraries, not the nanoseconds.
pnpm benchSizeScale reruns Size at scale, pnpm benchBigApp the generated apps and ntwine, and pnpm benchBuildTime Build time.
The benchmarks' README has what each suite needs installed, how each library was added to it, the versions every row was measured at and every run's results.