Skip to content

bench: monthly standings - #1731

Merged
ssalbdivad merged 1 commit into
featherdusterfrom
bench/monthly-standings-featherduster
Nov 19, 2026
Merged

ssalbdivad merged 1 commit into
featherdusterfrom
bench/monthly-standings-featherduster

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Only ArkType was measured again, at 591cc38d7 (featherduster) on 2026-11-19 on ubuntu-24.04. Every rival's result is carried from the run of 2026-11-19, at the versions that run installed ("Versions" below), and wasn't measured again: a rival's count or bundle changes with its release, not from one run to the next. startup.ts installs nothing and pairs its arms by round, so every arm of it was counted. Nothing is published until this is merged.

CI hasn't run here: a pull request opened with the workflow's token triggers no other workflow. Close and reopen it, or push to bench/monthly-standings-featherduster, to run the checks.

Versions

suite package before after
form effect 4.1.2 4.1.4
form typia 15.2.2 15.4.1
form ttsc 0.36.2 0.37.2
sb ata-validator 1.63.1 1.64.0
sb typia 15.2.2 15.4.1
sb ttsc 0.37.2
sb @ttsc/unplugin 0.37.2
moltar @sx3/gate 1.0.10
moltar ata-validator 1.65.0
moltar pure-parse 1.0.3
moltar typia 15.4.1
moltar valibot 1.5.0
moltar zod 4.6.7
ata ata-validator 1.65.0
ata typia 15.4.1
ata zod 4.6.7
ata ttsc 0.37.2
Every install
suite package before after
form @sinclair/typebox 0.34.52 0.34.52
form ajv 8.20.0 8.20.0
form ajv-errors 3.0.0 3.0.0
form ajv-formats 3.0.1 3.0.1
form effect 4.1.2 4.1.4
form joi 18.3.2 18.3.2
form runtypes 7.0.5 7.0.5
form superstruct 2.0.2 2.0.2
form valibot 1.5.0 1.5.0
form yup 1.7.1 1.7.1
form zod 4.6.7 4.6.7
form typia 15.2.2 15.4.1
form ttsc 0.36.2 0.37.2
sb ata-validator 1.63.1 1.64.0
sb typia 15.2.2 15.4.1
sb ttsc 0.37.2
sb @ttsc/unplugin 0.37.2
sury zod 4.6.7 4.6.7
sury valibot 1.5.0 1.5.0
moltar @sx3/gate 1.0.10
moltar ata-validator 1.65.0
moltar pure-parse 1.0.3
moltar typia 15.4.1
moltar valibot 1.5.0
moltar zod 4.6.7
ata ata-validator 1.65.0
ata typia 15.4.1
ata zod 4.6.7
ata ttsc 0.37.2

Numbers that changed

The leaderboard's results (ark/docs/lib/bench/leaderboard.json), where each rival keeps the better of its installs:

category suite result library before after change
speed moltar's typescript-runtime-type-benchmarks parseSafe ArkType 184.6 184.4 -0.2261 (-0.1%)
speed moltar's typescript-runtime-type-benchmarks parseSafe Typia 212.7 212.7 -0.008054 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks parseSafe @sx3/gate 233.4 233.4 -0.001807 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks parseSafe paseri 257.7 257.7 -0.01580 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks parseSafe Zod (compiled) 250.4 250.4 -0.005956 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks parseSafe sury 269.4 269.4 -0.01284 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertLoose ArkType 66 66.02 +0.01570 (+0.0%)
speed moltar's typescript-runtime-type-benchmarks assertLoose Typia 82.02 82.01 -0.005905 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertLoose sury 166.0 166.0 -0.00005300 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertLoose pure-parse 199.0 199.0 -0.0004055 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertLoose type-predicate-generator 79.01 79.01 -0.003938 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertLoose stnl 100.0 100.0 -0.007205 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertStrict ArkType 332 332.0 +0.01839 (+0.0%)
speed moltar's typescript-runtime-type-benchmarks assertStrict @sx3/gate 408.0 408.0 -0.00004450 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertStrict sury 536.0 536.0 -0.002383 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertStrict ts-runtime-checks 425.0 425.0 -0.003719 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertStrict spectypes 480.7 480.7 -0.008393 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks assertStrict TypeBox 331.3 331.3 -0.01585 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks parseStrict ArkType 339 339.0 +0.01584 (+0.0%)
speed moltar's typescript-runtime-type-benchmarks parseStrict Typia 334.3 334.3 -0.002336 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks parseStrict sury 538.0 538.0 -0.002091 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks parseStrict pure-parse 1674.3 1577.3 -97.00 (-5.8%)
speed moltar's typescript-runtime-type-benchmarks parseStrict ts-runtime-checks 428.0 428.0 -0.005427 (-0.0%)
speed moltar's typescript-runtime-type-benchmarks parseStrict TypeBox 372.3 372.3 -0.01272 (-0.0%)
startup startup.ts form ArkType 883248 818970 -64278 (-7.3%)
startup startup.ts form Valibot 2337538.5 2483129.5 +145591 (+6.2%)
startup startup.ts form Zod 43702450.5 44097654 +395203.5 (+0.9%)
startup startup.ts form Zod (compiled) 52028398 52409263.5 +380865.5 (+0.7%)
startup startup.ts form Zod Mini 11265647.5 11493238.5 +227591 (+2.0%)
startup startup.ts login ArkType 872950 686890 -186060 (-21.3%)
startup startup.ts login Valibot 2334652.5 2351870.5 +17218 (+0.7%)
startup startup.ts login Zod 43474500 43723128.5 +248628.5 (+0.6%)
startup startup.ts login Zod (compiled) 53260405.5 51553215.5 -1707190 (-3.2%)
startup startup.ts login Zod Mini 11295581.5 11412373.5 +116792 (+1.0%)
startup startup.ts login Typia 2421246.5 2446239.5 +24993 (+1.0%)
startup startup.ts login ajv 1855175 1868632.5 +13457.5 (+0.7%)
startup startup.ts login TypeBox 87425192 87937352.5 +512160.5 (+0.6%)
startup startup.ts moltar ArkType 982844 939997 -42847 (-4.4%)
startup startup.ts moltar Valibot 2210805 2287325 +76520 (+3.5%)
startup startup.ts moltar Zod 53463056 53958065 +495009 (+0.9%)
startup startup.ts moltar Zod (compiled) 58087833.5 58626421.5 +538588 (+0.9%)
startup startup.ts moltar Zod Mini 10246321 10519639 +273318 (+2.7%)
startup startup.ts moltar Typia 1153834 1335403 +181569 (+15.7%)
startup startup.ts moltar ajv 1435772 1610946 +175174 (+12.2%)
startup startup.ts moltar TypeBox 88713539.5 89414311 +700771.5 (+0.8%)
startup startup.ts shop ArkType 9843386.5 9360164.5 -483222 (-4.9%)
startup startup.ts shop Valibot 12159645 12298290 +138645 (+1.1%)
startup startup.ts shop Zod 101864814.5 102342753.5 +477939 (+0.5%)
startup startup.ts shop Zod (compiled) 125393694.5 126147803.5 +754109 (+0.6%)
startup startup.ts shop Zod Mini 36713210.5 37027325 +314114.5 (+0.9%)
startup startup.ts shop Typia 33277324 33412571.5 +135247.5 (+0.4%)
startup startup.ts shop ajv 32680933 32908670 +227737 (+0.7%)
startup startup.ts shop TypeBox 207229112.5 207624921 +395808.5 (+0.2%)
speed schemabenchmarks.dev parsing invalid paseri 13924.9 13525.7 -399.2 (-2.9%)
speed schemabenchmarks.dev parsing invalid @railway-ts/pipelines 7056.5 7049.6 -6.894 (-0.1%)
speed schemabenchmarks.dev parsing invalid @sapphire/shapeshift 1422795.9 1408962.1 -13833.8 (-1.0%)
speed schemabenchmarks.dev parsing invalid decoders 362723.3 359226.8 -3496.4 (-1.0%)
speed schemabenchmarks.dev parsing invalid io-ts 63543.7 60660.4 -2883.3 (-4.5%)
speed schemabenchmarks.dev parsing invalid runtypes 1662181.2 1650839.1 -11342.1 (-0.7%)
speed schemabenchmarks.dev parsing invalid sury 30778.2 30335.6 -442.6 (-1.4%)
speed schemabenchmarks.dev parsing invalid TypeBox 98921.9 98596.4 -325.5 (-0.3%)
speed schemabenchmarks.dev parsing invalid Typia 141854.9 112744.2 -29110.6 (-20.5%)
speed schemabenchmarks.dev parsing invalid Valibot 4704.2 4648.3 -55.85 (-1.2%)
speed schemabenchmarks.dev parsing invalid Yup 520802.9 472313.2 -48489.7 (-9.3%)
speed schemabenchmarks.dev parsing invalid Zod 125328.2 120082.7 -5245.5 (-4.2%)
speed schemabenchmarks.dev parsing invalid Zod (compiled) 124725.5 121619.2 -3106.4 (-2.5%)
speed schemabenchmarks.dev parsing invalid Zod Mini 205462.0 204700.5 -761.5 (-0.4%)
speed schemabenchmarks.dev parsing invalid Zod 3 307160.4 295142.7 -12017.7 (-3.9%)
speed schemabenchmarks.dev parsing invalid ArkType 144.2 161.4 +17.20 (+11.9%)
speed schemabenchmarks.dev parsing valid paseri 11044.5 11041.9 -2.535 (-0.0%)
speed schemabenchmarks.dev parsing valid @railway-ts/pipelines 162816.2 155723.3 -7092.9 (-4.4%)
speed schemabenchmarks.dev parsing valid @remix-run/data-schema 79000.0 77512.6 -1487.4 (-1.9%)
speed schemabenchmarks.dev parsing valid @sapphire/shapeshift 169109.3 168314.9 -794.4 (-0.5%)
speed schemabenchmarks.dev parsing valid ata 6853.1 6843.6 -9.573 (-0.1%)
speed schemabenchmarks.dev parsing valid decoders 89262.7 88141.7 -1121.1 (-1.3%)
speed schemabenchmarks.dev parsing valid io-ts 57549.5 57536.5 -12.97 (-0.0%)
speed schemabenchmarks.dev parsing valid Joi 318854.4 318119.6 -734.8 (-0.2%)
speed schemabenchmarks.dev parsing valid runtypes 745531.7 699027.9 -46503.7 (-6.2%)
speed schemabenchmarks.dev parsing valid Superstruct 481499.1 461111.2 -20387.8 (-4.2%)
speed schemabenchmarks.dev parsing valid sury 14191.4 14188.9 -2.530 (-0.0%)
speed schemabenchmarks.dev parsing valid Typia 43047.4 16791.4 -26256.0 (-61.0%)
speed schemabenchmarks.dev parsing valid Valibot 73924.4 72594.9 -1329.5 (-1.8%)
speed schemabenchmarks.dev parsing valid Yup 1024445.4 955778.3 -68667.1 (-6.7%)
speed schemabenchmarks.dev parsing valid Zod 61169.0 59822.7 -1346.4 (-2.2%)
speed schemabenchmarks.dev parsing valid Zod 3 124245.9 122333.9 -1911.9 (-1.5%)
speed schemabenchmarks.dev parsing valid zod-compiler 13538.0 13537.9 -0.04680 (-0.0%)
speed schemabenchmarks.dev parsing valid ArkType 5984.6 5984.4 -0.1682 (-0.0%)
speed schemabenchmarks.dev standard valid @railway-ts/pipelines 163496.0 155389.3 -8106.7 (-5.0%)
speed schemabenchmarks.dev standard valid @remix-run/data-schema 79064.7 78038.7 -1025.9 (-1.3%)
speed schemabenchmarks.dev standard valid ata 6842.7 6836.2 -6.421 (-0.1%)
speed schemabenchmarks.dev standard valid decoders 88168.1 87736.3 -431.7 (-0.5%)
speed schemabenchmarks.dev standard valid Effect Schema 83639.5 83566.8 -72.71 (-0.1%)
speed schemabenchmarks.dev standard valid Joi 355975.4 355895.3 -80.12 (-0.0%)
speed schemabenchmarks.dev standard valid sury 14224.7 14221.8 -2.892 (-0.0%)
speed schemabenchmarks.dev standard valid Typia 43059.1 16790.3 -26268.8 (-61.0%)
speed schemabenchmarks.dev standard valid Valibot 73864.6 72639.7 -1224.9 (-1.7%)
speed schemabenchmarks.dev standard valid Yup 1300560.7 1205949.7 -94611.0 (-7.3%)
speed schemabenchmarks.dev standard valid Zod 61180.9 59699.4 -1481.5 (-2.4%)
speed schemabenchmarks.dev standard valid Zod Mini 127603.0 127337.8 -265.2 (-0.2%)
speed schemabenchmarks.dev standard valid Zod 3 127894.9 121574.4 -6320.5 (-4.9%)
speed schemabenchmarks.dev standard valid ArkType 6119.3 6114.4 -4.820 (-0.1%)
speed schemabenchmarks.dev standard invalid paseri 37737.3 36900.3 -837.0 (-2.2%)
speed schemabenchmarks.dev standard invalid @railway-ts/pipelines 202166.6 195491.0 -6675.7 (-3.3%)
speed schemabenchmarks.dev standard invalid @remix-run/data-schema 129432.5 126727.6 -2704.9 (-2.1%)
speed schemabenchmarks.dev standard invalid Effect Schema 16594.0 16403.2 -190.9 (-1.2%)
speed schemabenchmarks.dev standard invalid Joi 32319.6 32256.3 -63.36 (-0.2%)
speed schemabenchmarks.dev standard invalid sury 31528.3 29701.6 -1826.7 (-5.8%)
speed schemabenchmarks.dev standard invalid Typia 192687.0 170909.3 -21777.8 (-11.3%)
speed schemabenchmarks.dev standard invalid Valibot 113677.5 111786.6 -1890.9 (-1.7%)
speed schemabenchmarks.dev standard invalid Yup 3770273.2 3598132.3 -172140.9 (-4.6%)
speed schemabenchmarks.dev standard invalid Zod 150962.0 143590.0 -7372.0 (-4.9%)
speed schemabenchmarks.dev standard invalid Zod (compiled) 151573.1 144045.3 -7527.8 (-5.0%)
speed schemabenchmarks.dev standard invalid Zod Mini 218562.0 211862.1 -6699.9 (-3.1%)
speed schemabenchmarks.dev standard invalid Zod 3 248766.5 244480.2 -4286.3 (-1.7%)
speed schemabenchmarks.dev standard invalid zod-compiler 60315.9 59296.3 -1019.5 (-1.7%)
speed schemabenchmarks.dev standard invalid ArkType 29186.3 29002.2 -184.1 (-0.6%)
speed schemabenchmarks.dev string date-time valid @railway-ts/pipelines 15973.4 13465.3 -2508.2 (-15.7%)
speed schemabenchmarks.dev string date-time valid ata 562.5 562.4 -0.03118 (-0.0%)
speed schemabenchmarks.dev string date-time valid Joi 28365.6 23350.9 -5014.8 (-17.7%)
speed schemabenchmarks.dev string date-time valid sury 618.5 618.4 -0.005930 (-0.0%)
speed schemabenchmarks.dev string date-time valid TypeBox 14230.9 14226.0 -4.866 (-0.0%)
speed schemabenchmarks.dev string date-time valid Yup 12961.7 12228.0 -733.7 (-5.7%)
speed schemabenchmarks.dev string date-time valid Zod Mini 870.9 867.7 -3.216 (-0.4%)
speed schemabenchmarks.dev string date-time valid Zod 3 7876.4 7615.4 -260.9 (-3.3%)
speed schemabenchmarks.dev string date-time valid ArkType 489.5 489.5 +0.01626 (+0.0%)
speed schemabenchmarks.dev string date valid paseri 535.5 535.5 -0.01468 (-0.0%)
speed schemabenchmarks.dev string date valid @railway-ts/pipelines 13680.9 11172.8 -2508.1 (-18.3%)
speed schemabenchmarks.dev string date valid @sapphire/shapeshift 1340.1 1332.4 -7.620 (-0.6%)
speed schemabenchmarks.dev string date valid ajv 2212.5 2211.9 -0.6453 (-0.0%)
speed schemabenchmarks.dev string date valid sury 493.5 493.4 -0.05330 (-0.0%)
speed schemabenchmarks.dev string date valid TypeBox 10179.0 10158.9 -20.05 (-0.2%)
speed schemabenchmarks.dev string date valid Typia 2361.1 2360.5 -0.5745 (-0.0%)
speed schemabenchmarks.dev string date valid Valibot 837.8 834.8 -3.069 (-0.4%)
speed schemabenchmarks.dev string date valid Zod 803.9 803.9 -0.02396 (-0.0%)
speed schemabenchmarks.dev string date valid Zod Mini 803.8 800.9 -2.987 (-0.4%)
speed schemabenchmarks.dev string time valid paseri 389.5 389.5 -0.00003500 (-0.0%)
speed schemabenchmarks.dev string time valid @railway-ts/pipelines 3140.0 3126.3 -13.68 (-0.4%)
speed schemabenchmarks.dev string time valid ajv 2506.5 2502.4 -4.137 (-0.2%)
speed schemabenchmarks.dev string time valid TypeBox 10441.2 10427.6 -13.55 (-0.1%)
speed schemabenchmarks.dev string time valid Typia 1217.6 1216.7 -0.8760 (-0.1%)
speed schemabenchmarks.dev string email valid paseri 1132.5 1132.4 -0.02986 (-0.0%)
speed schemabenchmarks.dev string email valid @railway-ts/pipelines 1430.6 1416.8 -13.77 (-1.0%)
speed schemabenchmarks.dev string email valid @sapphire/shapeshift 4658.0 4653.3 -4.689 (-0.1%)
speed schemabenchmarks.dev string email valid ajv 775.5 775.4 -0.08041 (-0.0%)
speed schemabenchmarks.dev string email valid Joi 13939.1 13901.9 -37.13 (-0.3%)
speed schemabenchmarks.dev string email valid sury 1165.5 1165.5 -0.01060 (-0.0%)
speed schemabenchmarks.dev string email valid TypeBox 8803.7 8796.3 -7.382 (-0.1%)
speed schemabenchmarks.dev string email valid Yup 6965.2 6454.7 -510.6 (-7.3%)
speed schemabenchmarks.dev string email valid Zod 1149.8 1149.7 -0.1216 (-0.0%)
speed schemabenchmarks.dev string email valid Zod 3 1814.3 1813.4 -0.9143 (-0.1%)

214 more rows are in the run's artifact.

Each place and geometric mean that moved on the board, by the rule the headline follows (standings.ts, which runs ark/docs/lib/bench/units.ts):

category library before after
speed ArkType 1. 664 1. 658
speed Typia 2. 2,863 2. 2,097
speed Valibot 3. 5,675 3. 5,647
speed TypeBox 4. 7,845 4. 7,832
speed Zod 5. 10,117 5. 10,044
startup ArkType 1. 40 1. 38
startup Valibot 3. 15,028 3. 14,801
startup sury 4. 120k 4. 119k
startup Zod 5. 919k 5. 895k
startup Zod (compiled) 6. 1.32M 6. 1.18M

Claims

Every claim holds on the new numbers, as before. Of those ark/docs/lib/bench/headline.ts lists, these 2 read differently:

  • speedAverage
    • before: Fastest on average across 22 results from 2 independent benchmarks: 664 CPU instructions per validation against Typia's 2,863, 76.8% lower.
    • after: Fastest on average across 22 results from 2 independent benchmarks: 658 CPU instructions per validation against Typia's 2,097, 68.6% lower.
  • startupAverage
    • before: Quickest to start on average across 2 results from 2 independent benchmarks: 40 CPU instructions to create a schema against TypeBox's 4,273, 99.1% lower.
    • after: 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.
Every claim, after
  • headline: TypeScript's smallest, fastest validator.
  • boardTitle: Fast. Small. Quick to start. Pick 3.
  • speedAverage: Fastest on average across 22 results from 2 independent benchmarks: 658 CPU instructions per validation against Typia's 2,097, 68.6% lower.
  • startupAverage: 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.
  • sizeAverage: 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.
  • leaveOneOut: The validation speed and bundle size leads hold with any one benchmark left out. The startup lead doesn't survive leaving out Sury's build and parse once.

Not rerun

  • Every rival: its results are the last run's that installed its newest release. pnpm benchExternal all --newest, or this workflow without arktype_only, measures each again at whatever its newest release then is.
  • Startup's rivals at their newest releases: startup.ts was counted again, but it bundles the repo's own dependencies, so each rival is at the version pnpm-lock.yaml pins.
  • The homepage's speed and cold-start rows (pnpm benchValidate, pnpm benchImport) and build times (pnpm benchBuildTime): wall clock, which on a shared runner measures the neighbors. Rerun them on a quiet machine.
  • Size at scale (pnpm benchSizeScale): bundle bytes, so any machine measures it, but its peak of 13 GiB of memory is more than a hosted runner's 16 GiB leaves it. It takes about half an hour.

Generated text

The docs build writes these from the numbers (ark/docs/lib/writeMarkdown.ts), and they're written again here: ark/docs/public/docs/precompile/llms.txt, ark/docs/public/llms-full.txt, ark/docs/public/llms.txt. ark/docs/public/llms-full.txt already trailed its sources at 591cc38d7, so its diff holds that too. Any other file the docs build would rewrite at that commit is left as it is.

The raw results' changes and the standings were too long for a pull request's body: they're in the run's artifact.


The run, with every file it wrote as its leaderboard artifact.

@github-project-automation github-project-automation Bot moved this to To do in arktypeio Nov 19, 2026
ssalbdivad added a commit that referenced this pull request Nov 19, 2026
… failure shares

ba691ac gave a failure its errors' summary as `message`, written as
`get message()` in the failure's literal so that a consumer reading
issues alone writes no summary. That getter is a function of its own
for each failure, and V8 kept every failure built that way in
dictionary mode: none shared a shape. Building the result then cost
more than finding the issues. On schemabenchmarks.dev's invalid product
(`~standard.validate`, the result unread; instructions per call on an
Apple M5, one case a process as the suite's harness counts them):

  2071002, before the message      29,613
  854c05a                          61,394
  here                               29,541
  with no message at all             25,716

The hosted run behind #1731 counted the same doubling
on x86 (29,186 to 61,814), which took the row from 2nd of 17 to 7th.

A failure is now `{ issues }` with two properties defined on it: `_s`,
a function writing its errors' summary, and `message`, an accessor
whose getter is one function for every failure and calls `_s`. It is
still the failure's own, enumerable and unwritten until read:
Object.keys, a spread and JSON.stringify see it as before, and none of
them sees `_s`, which isn't enumerable. `message` is no longer
configurable.

What it is not, and why:

- Not written from `this.issues`. Each errors class writes its own
  summary, and arktype's writes it in the locale its errors were read
  in, which the issues don't hold. A summary written from issues alone
  would be the precompiled runtime's English lines for a Type that
  traverses under another locale.
- Not the errors themselves in `_s`. A failure kept in a reactive
  store is read through a proxy that wraps each object it returns, and
  arktype's errors can't tell their own errors through one ("Only
  errors validation returned can be written again"). A function is
  returned as it is. For the same proxies `_s` is writable: one may not
  return another value for a property that is neither writable nor
  configurable.
- Not a WeakMap from the failure or its issues to the errors: 45,900
  and 62,800 instructions.
- Not one define. Each Object.defineProperty is about 1,900
  instructions. A symbol-keyed `_s` in the literal needs only
  `message` defined and counts 27,200, but the key is enumerable, so
  it is printed, copied and compared with the failure, and it is 10
  bytes more gzipped. Object.defineProperties with both is 31,500.

The precompiled runtime builds a failure in arktype/runtime's
standardResultOf and arktype in @ark/schema's standardFailureOf, the
same eight lines twice. arktype/runtime can't import @ark/schema's
without costing bundles that hold neither: esbuild's minifier numbers a
bundle's names past each name a live import statement lists, used or
not, and one more moved the Valibot login form's export from `lo` to
`co`, 917 to 918 bytes gzipped, though the form holds no `~standard`.
Written in place the form is byte for byte what it was.

Bytes, min / gzip. Unchanged: the Valibot login form 1,871 / 917
(smallest 1,699 / 878) and schemabenchmarks.dev's download 5,568 /
1,547, neither of which holds `~standard`. The homepage's apps, which
do:

  default   login 2,333 / 1,140 -> 2,442 / 1,177
            moltar 3,003 / 1,188 -> 3,112 / 1,228
            shop 20,764 / 5,074 -> 20,873 / 5,115
  smallest  login 1,934 / 998 -> 2,043 / 1,038
            moltar 2,212 / 1,132 -> 2,321 / 1,171
            shop 7,774 / 3,420 -> 7,883 / 3,464

Tests: the message isn't written until it's read and every failure's
getter is the same function; a failure read through a wrapping proxy
writes its message; testV8 holds failures to fast properties and one
map, which 854c05a's fail.
ssalbdivad added a commit that referenced this pull request Nov 19, 2026
…ithout a Map

3e27c4e made errors that wait to be read the class a build writes
(findsOnRead), and left every other runtime, a dev server's, an
unpruned build's or a library another build precompiled, waiting as
before: through a class beside the errors', built at a class's first
failure. Before it that class was a module variable for ArkErrors.
After it every class's was looked up in a Map on each failing call,
and the lookup was nearly half of what a call that leaves its errors
unread costs.

ArkErrors' class is a module variable again, and the Map holds only
the others'. On schemabenchmarks.dev's invalid product (`schema(data)`,
the result unread; instructions per call on an Apple M5, one case a
process), in the unpruned build the suite's counted arm was:

  2071002   132.7
  854c05a   254.7
  here        138.9

That arm is what the hosted run behind #1731 counted
at 261.3 where 2071002's was 144.2, losing the row to zod-compiler's
250.3. A pruned build never ran this code: it folds findsOnRead and
holds no class beside its errors', so the Valibot login form (917 B
gzipped) and schemabenchmarks.dev's download (1,547) are byte for byte
what they were.
ssalbdivad added a commit that referenced this pull request Nov 19, 2026
…s download arm is

The suite has two ArkType arms built apart: the download test's bundle,
which reproduce.ts builds with ARK_OPTIONS, and the module every speed
row runs, which sb/precompiled/generate.ts builds with tsdown. A tsdown
build can't tell the plugin it's a production build, so generate.ts
spells out what one defaults to. It listed @ark/aot's
productionDefaults and not prune, which a production build also has
unless it's set false and which the download arm passes. So the speed
rows were counted on a build nobody ships by default: its runtime was
arktype's as written, not as a build writes it for what the module
reads.

Until 3e27c4e the two ran the same code on a failing call. Since it,
only a pruned build's errors find their own issues when read, and the
unpruned arm paid a lookup per failure (the commit before this one).
With prune the arm's "parsing invalid" row counts, on an Apple M5, one
case a process:

  2071002                 132.7
  854c05a, unpruned       254.7
  here, pruned              145.5

13 instructions over 2071002, about what the deferral's rework was
measured to add (11, from 195 to 206 on the moltar app), where the
unpruned arm added 122 here and 117 in the hosted run behind
#1731. Every other row of the arm is within
0.1% of what it was, and each of its 19 cases still returns what
allChild.ts's check expects.

Every other counted arm already builds for production, and so prunes:
moltar/build.ts, ata/build.ts, sury/bundle.ts, sb/bundle.ts, startup.ts
and forms/size.ts all bundle with esbuild's "production" condition,
which the plugin reads. None of them changed.
ssalbdivad added a commit that referenced this pull request Nov 19, 2026
… result

The hosted run behind #1731 took 62 minutes to count
every library, and what it found wrong was ArkType's: two rows, both
fixed in the three commits before this one. Measuring that fix
shouldn't mean measuring 668 rival arms again. A rival's count changes
with its release, not with the run: that run's host, an Intel Xeon
under KVM, counted 0.973 to 1.002 of what the stored i7 did on the 10
schemabenchmarks.dev arms on the same suite commit and release, and
0.999 to 1.001 on the 17 of ArkType's own rows its code hadn't changed.

`pnpm benchExternal <suite> --newest --arktype-only`:

- installs each suite from its own lockfile, with no rival moved to a
  newer release, and for moltar's compiles none of the rivals' cases,
  which ArkType's arms don't load
- counts only the arms whose label names ArkType (54 of 722: moltar's
  4, schemabenchmarks.dev's 38, Sury's 4, ata's 8). count.ts resumes
  from its out file, so that file starts as the rivals' stored counts
- runs the size scripts as they are, since each measures every library
  in one pass, and takes only ArkType's entries from what they write
  (newest.ts's carriedWith, by a label at any depth or an element's
  libraryName)
- counts startup.ts whole: it installs nothing, and its wins pair
  every arm by round
- keeps each suite's day and installs in run.json, which are its
  rivals', and records ArkType's commit and `arkTypeDate`. The
  leaderboard's "measured" is unchanged in meaning: the rivals' day and
  ArkType's commit

It throws where results/newest has no run to keep, rather than
counting ArkType against nothing.

The workflow takes `arktype_only`. The rivals' results it keeps are
the last run's, and while that run's pull request is open they are on
its branch, not the one measured. So the run reads results/newest from
`bench/monthly-standings[-<branch>]` into the working tree, leaving the
index at the branch's head: monthly.ts then reports every change from
the branch, the rivals' as that run found them and ArkType's as this
one did, and publishes all of it to the same branch, so the open pull
request is rewritten whole. Where no such branch exists the results are
the ones checked in. The pull request says first that only ArkType was
measured again, at which commit, and which day's run every rival's
result is carried from.

run.json's commit is nine digits again. `git rev-parse --short` picks
a length by how many objects the clone holds, and the runner's shallow
one wrote seven.

Dry run on a Mac, with stand-ins for taskset and perf (the stand-in
counts the child's retired instructions with proc_pid_rusage) and
results/newest read from #1731's branch: 4 minutes 40
seconds against 17 for every library there. Every rival's leaf in every
stored file was unchanged but startup.json's, every ArkType count was
replaced, no install of a newer release ran, and monthly.ts wrote the
body with the carry stated first.
Written by .github/workflows/leaderboard.yml's rerun of the benchmarks a hosted runner measures, with each rival at its newest release: https://github.com/arktypeio/arktype/actions/runs/44620007851. Its pull request says what changed.
@github-actions
github-actions Bot force-pushed the bench/monthly-standings-featherduster branch from a75b521 to 7732e41 Compare November 19, 2026 21:49
@ssalbdivad
ssalbdivad merged commit d72758b into featherduster Nov 19, 2026
@ssalbdivad
ssalbdivad deleted the bench/monthly-standings-featherduster branch November 19, 2026 22:09
@github-project-automation github-project-automation Bot moved this from To do to Done (merged or closed) in arktypeio Nov 19, 2026
ssalbdivad added a commit that referenced this pull request Nov 19, 2026
… does, or not at all

The run behind #1731 committed an llms-full.txt without eleven lines twoslash
adds: ten "// TypeScript: ..." errors and one hover. `pnpm buildDocs` on the
same tree put them back (6dc5793). The benchmarks in between had nothing to
do with it: at a clean, fully built checkout, with no benchmark run,

    node -e 'import("./ark/docs/lib/writeMarkdown.ts").then(m => m.writeMarkdown())'

from the repo root, which is what monthly.ts ran, drops the same eleven lines
in about a second, and from ark/docs it changes nothing. Two things had to
line up.

twoslash resolves a snippet's imports from its vfsRoot, which defaults to
process.cwd(). arktype and its companions are installed under
ark/docs/node_modules and not at the repo root, so from the root none of them
resolved and every snippet's types were `any`. `next build` starts in the
docs, so the docs build never saw it. The twoslasher now names the docs as its
root, whatever directory the process started in.

The guard from 0c6d0c9 did catch it: it threw "const User: ..." has no type
for the first snippet. But codeForMarkdown only rethrows in a production
build, so that a broken snippet doesn't take down `next dev`, and otherwise
writes the snippet with its twoslash directives stripped. monthly.ts never set
NODE_ENV, so every snippet with `// @errors` or `// ^?` was quietly written
without what twoslash adds. The baseline step wrote the same degraded text, so
the files the numbers didn't touch (docs/regex/llms.txt, which loses its
hovers the same way) compared as unmoved and were restored, and only
llms-full.txt, which the numbers did change, was committed with the loss.

monthly.ts now writes the text as next.config.ts has it written: in ark/docs
and with NODE_ENV=production. A snippet whose types don't resolve, or a page
tree with errors, fails writeMarkdown there, and the pull request's body says
the text was "Not written again" and that the run's log has why, as it
already did for a writeMarkdown that failed.

Checked by running the steps in a temp dir with twoslash's cache cleared:
- `monthly.ts baseline` keeps nothing, where before it kept llms-full.txt and
  docs/regex/llms.txt
- `monthly.ts report` after changing one number in presetScale.json writes no
  checked-in text differently
- the same with ark/type/out/index.d.ts hidden leaves the text as checked in
  and the body reads "Not written again"

The new test in markdown.test.ts is the first snippet that lost its error.
Mocha starts at the repo root, so without the vfsRoot it fails on a cold
cache, as CI's is. A warm one (ark/docs/node_modules/.cache/ark-docs/twoslash)
hides it, since a result's key doesn't have the directory in it and a
degraded result is never cached.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done (merged or closed)

Development

Successfully merging this pull request may close these issues.

1 participant