@arrirpc/schema 0.79.1 → 0.80.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +114 -119
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1142,7 +1142,7 @@ $$User.compiledCode.serialize; // the generated serialization code
1142
1142
 
1143
1143
  ## Benchmarks
1144
1144
 
1145
- _Last Updated: 2025-03-19T21:46:43.732Z_
1145
+ _Last Updated: 2025-06-09T18:41:32.823Z_
1146
1146
 
1147
1147
  All benchmarks were run on my personal desktop. You can view the methodology used in [./benchmarks/src](./benchmark/src).
1148
1148
 
@@ -1193,94 +1193,92 @@ interface TestUser {
1193
1193
 
1194
1194
  | Library | op/s |
1195
1195
  | ------------------------------------- | ---------- |
1196
- | **Arri (Compiled)** | 54,124,628 |
1197
- | TypeBox (Compiled) | 42,197,488 |
1198
- | Ajv - JTD (Compiled) | 31,927,096 |
1199
- | Arktype | 29,595,516 |
1200
- | Typia | 28,381,607 |
1201
- | **Arri (Compiled) - Standard Schema** | 18,826,632 |
1202
- | Ajv - JSON Schema (Compiled) | 11,420,306 |
1203
- | Ajv - JTD | 11,368,094 |
1204
- | Ajv - JSON Schema | 8,370,741 |
1205
- | **Arri** | 2,732,305 |
1206
- | **Arri - Standard Schema** | 757,117 |
1207
- | TypeBox | 733,853 |
1208
- | Valibot | 607,841 |
1209
- | Zod | 467,553 |
1196
+ | **Arri (Compiled)** | 54,207,983 |
1197
+ | TypeBox (Compiled) | 42,991,276 |
1198
+ | Arktype | 28,628,730 |
1199
+ | Typia | 28,500,181 |
1200
+ | **Arri (Compiled) - Standard Schema** | 19,420,723 |
1201
+ | Ajv - JSON Schema (Compiled) | 11,612,359 |
1202
+ | Ajv - JSON Schema | 11,337,540 |
1203
+ | Zod/v4 | 3,080,359 |
1204
+ | **Arri** | 2,719,630 |
1205
+ | **Arri - Standard Schema** | 760,346 |
1206
+ | TypeBox | 720,807 |
1207
+ | Valibot | 594,403 |
1208
+ | Zod | 463,499 |
1210
1209
 
1211
1210
  #### Object Validation - Bad Input
1212
1211
 
1213
1212
  | Library | op/s |
1214
1213
  | ------------------------------------- | ---------- |
1215
- | **Arri (Compiled)** | 63,206,923 |
1216
- | TypeBox (Compiled) | 47,209,177 |
1217
- | Typia | 30,610,871 |
1218
- | Ajv - JTD (Compiled) | 25,543,957 |
1219
- | Ajv - JTD | 13,095,043 |
1220
- | **Arri (Compiled) - Standard Schema** | 8,184,643 |
1221
- | Ajv - JSON Schema (Compiled) | 4,543,106 |
1222
- | **Arri** | 4,237,065 |
1223
- | Ajv - JSON Schema | 3,790,517 |
1224
- | TypeBox | 906,797 |
1225
- | **Arri - Standard-Schema** | 794,635 |
1226
- | Valibot | 485,994 |
1227
- | Zod | 321,011 |
1228
- | Arktype | 139,720 |
1214
+ | **Arri (Compiled)** | 60,871,312 |
1215
+ | TypeBox (Compiled) | 47,747,764 |
1216
+ | Typia | 31,195,589 |
1217
+ | **Arri (Compiled) - Standard Schema** | 8,314,141 |
1218
+ | Ajv - JSON Schema (Compiled) | 4,523,107 |
1219
+ | Ajv - JSON Schema | 4,315,160 |
1220
+ | **Arri** | 3,992,012 |
1221
+ | TypeBox | 891,805 |
1222
+ | **Arri - Standard-Schema** | 757,845 |
1223
+ | Valibot | 496,579 |
1224
+ | Zod | 352,986 |
1225
+ | Arktype | 149,079 |
1226
+ | Zod/v4 | 100,355 |
1229
1227
 
1230
1228
  #### Object Parsing - Good Input
1231
1229
 
1232
1230
  | Library | op/s |
1233
1231
  | ------------------------------------- | ------- |
1234
- | JSON.parse | 773,939 |
1235
- | JSON.parse + Typebox (Compiled) | 746,709 |
1236
- | Typia (json.createValidateParse) | 736,675 |
1237
- | JSON.parse + Arktype | 736,157 |
1238
- | **Arri (Compiled)** | 722,323 |
1239
- | **Arri (Compiled) - Standard Schema** | 711,010 |
1240
- | **Arri - Standard Schema** | 348,920 |
1241
- | **Arri** | 348,467 |
1242
- | JSON.parse + Valibot | 314,205 |
1243
- | JSON.parse + Zod | 280,872 |
1244
- | Ajv - JTD (Compiled) | 261,253 |
1245
- | JSON.parse + Typebox | 215,239 |
1232
+ | JSON.parse | 801,513 |
1233
+ | JSON.parse + Typebox (Compiled) | 754,820 |
1234
+ | **Arri (Compiled)** | 753,155 |
1235
+ | JSON.parse + Arktype | 748,862 |
1236
+ | **Arri (Compiled) - Standard Schema** | 745,964 |
1237
+ | Typia (json.createValidateParse) | 726,365 |
1238
+ | JSON.parse + Zod/v4 | 555,511 |
1239
+ | **Arri** | 365,992 |
1240
+ | **Arri - Standard Schema** | 365,640 |
1241
+ | JSON.parse + Valibot | 319,333 |
1242
+ | JSON.parse + Zod | 285,161 |
1243
+ | JSON.parse + Typebox | 215,169 |
1246
1244
 
1247
1245
  #### Object Parsing - Bad Input
1248
1246
 
1249
1247
  | Library | op/s |
1250
1248
  | ------------------------------------- | ------- |
1251
- | JSON.parse | 871,925 |
1252
- | **Arri (Compiled)** | 796,037 |
1253
- | **Arri (Compiled) - Standard Schema** | 728,394 |
1254
- | Typia (json.createValidateParse) | 556,550 |
1255
- | **Arri** | 415,938 |
1256
- | **Arri - StandardSchema** | 395,654 |
1257
- | Ajv - JTD (Compiled) | 332,767 |
1258
- | JSON.parse + Valibot | 300,625 |
1259
- | JSON.parse + Zod | 215,862 |
1260
- | JSON.parse + Arktype | 119,465 |
1261
- | JSON.parse + Typebox (Compiled) | 96,386 |
1262
- | JSON.parse + Typebox | 77,921 |
1249
+ | JSON.parse | 846,547 |
1250
+ | **Arri (Compiled)** | 779,979 |
1251
+ | **Arri (Compiled) - Standard Schema** | 718,259 |
1252
+ | Typia (json.createValidateParse) | 552,892 |
1253
+ | **Arri** | 414,169 |
1254
+ | **Arri (StandardSchema)** | 391,092 |
1255
+ | JSON.parse + Valibot | 289,960 |
1256
+ | JSON.parse + Zod | 220,650 |
1257
+ | JSON.parse + Arktype | 120,295 |
1258
+ | JSON.parse + Typebox (Compiled) | 99,136 |
1259
+ | JSON.parse + Zod/v4 | 80,506 |
1260
+ | JSON.parse + Typebox | 77,380 |
1263
1261
 
1264
1262
  #### Object Serialization
1265
1263
 
1266
1264
  | Library | op/s |
1267
1265
  | -------------------------------------------- | --------- |
1268
- | **Arri (Compiled)** | 4,342,282 |
1269
- | **Arri (Compiled) - Validate and Serialize** | 3,869,687 |
1270
- | Ajv - JTD (Compiled) | 2,100,923 |
1271
- | Typia | 1,823,903 |
1272
- | JSON.stringify | 1,635,149 |
1273
- | Typia - Validate and Serialize | 1,570,486 |
1274
- | **Arri** | 471,954 |
1266
+ | **Arri (Compiled)** | 3,984,935 |
1267
+ | **Arri (Compiled) - Validate and Serialize** | 3,583,501 |
1268
+ | Typia | 1,793,677 |
1269
+ | JSON.stringify | 1,645,335 |
1270
+ | Typia - Validate and Serialize | 1,540,510 |
1271
+ | **Arri** | 450,120 |
1275
1272
 
1276
1273
  #### Object Coercion
1277
1274
 
1278
1275
  | Library | op/s |
1279
1276
  | ------------------- | ---------- |
1280
- | **Arri (Compiled)** | 19,743,175 |
1281
- | **Arri** | 787,241 |
1282
- | Zod | 442,329 |
1283
- | TypeBox | 403,062 |
1277
+ | **Arri (Compiled)** | 19,370,221 |
1278
+ | Zod/v4 | 2,267,229 |
1279
+ | **Arri** | 738,461 |
1280
+ | Zod | 450,168 |
1281
+ | TypeBox | 403,602 |
1284
1282
 
1285
1283
  ### Integers
1286
1284
 
@@ -1290,87 +1288,84 @@ The following benchmarks measure how quickly each library operates on a single i
1290
1288
 
1291
1289
  | Library | op/s |
1292
1290
  | ------------------------------------- | ----------- |
1293
- | Ajv - JTD (Compiled) | 192,026,130 |
1294
- | TypeBox (Compiled) | 190,783,837 |
1295
- | **Arri (Compiled)** | 188,138,821 |
1296
- | Ajv - JSON Schema (Compiled) | 182,920,826 |
1297
- | **Arri - Standard Schema** | 110,055,872 |
1298
- | **Arri (Compiled) - Standard Schema** | 109,070,056 |
1299
- | **Arri** | 81,658,732 |
1300
- | Typia | 61,029,032 |
1301
- | Arktype | 54,370,348 |
1302
- | TypeBox | 48,673,070 |
1303
- | Ajv - JTD | 31,204,944 |
1304
- | Ajv - JSON Schema | 31,075,953 |
1305
- | Valibot | 23,309,004 |
1306
- | Zod | 1,277,690 |
1291
+ | **Arri (Compiled)** | 188,029,099 |
1292
+ | TypeBox (Compiled) | 186,595,706 |
1293
+ | Ajv - JSON Schema (Compiled) | 182,332,718 |
1294
+ | **Arri (Compiled) - Standard Schema** | 108,964,372 |
1295
+ | **Arri - Standard Schema** | 108,193,957 |
1296
+ | **Arri** | 84,093,924 |
1297
+ | Typia | 58,164,521 |
1298
+ | Arktype | 57,782,710 |
1299
+ | Ajv - JSON Schema | 50,350,825 |
1300
+ | TypeBox | 46,450,527 |
1301
+ | Valibot | 22,202,298 |
1302
+ | Zod/v4 | 18,948,463 |
1303
+ | Zod | 1,269,812 |
1307
1304
 
1308
1305
  #### Int Validation (Bad Input)
1309
1306
 
1310
1307
  | Library | op/s |
1311
1308
  | ------------------------------------- | ----------- |
1312
- | TypeBox (Compiled) | 190,126,454 |
1313
- | **Arri (Compiled)** | 189,172,106 |
1314
- | Ajv - JSON Schema (Compiled) | 75,375,601 |
1315
- | Ajv - JTD (Compiled) | 74,177,660 |
1316
- | Typia | 58,363,051 |
1317
- | TypeBox | 45,205,805 |
1318
- | **Arri** | 42,222,871 |
1319
- | Ajv - JSON Schema | 19,876,104 |
1320
- | Ajv - JTD | 19,027,047 |
1321
- | **Arri (Compiled) - Standard Schema** | 17,164,858 |
1322
- | **Arri - Standard Schema** | 12,296,640 |
1323
- | Valibot | 9,545,070 |
1324
- | Zod | 799,307 |
1325
- | Arktype | 451,199 |
1309
+ | TypeBox (Compiled) | 188,306,861 |
1310
+ | **Arri (Compiled)** | 186,071,486 |
1311
+ | Ajv - JSON Schema (Compiled) | 69,251,304 |
1312
+ | Typia | 60,060,635 |
1313
+ | TypeBox | 44,860,799 |
1314
+ | **Arri** | 39,998,319 |
1315
+ | Ajv - JSON Schema | 25,013,168 |
1316
+ | **Arri (Compiled) - Standard Schema** | 15,998,638 |
1317
+ | **Arri - Standard Schema** | 11,765,466 |
1318
+ | Valibot | 9,831,763 |
1319
+ | Zod | 766,604 |
1320
+ | Arktype | 439,401 |
1321
+ | Zod/v4 | 100,168 |
1326
1322
 
1327
1323
  #### Int Parsing (Good Input)
1328
1324
 
1329
- | Library | op/s |
1330
- | -------------------- | ----------- |
1331
- | **Arri (Compiled)** | 130,550,378 |
1332
- | **Arri** | 49,495,612 |
1333
- | JSON.parse() | 17,843,485 |
1334
- | Ajv - JTD (Compiled) | 9,664,631 |
1325
+ | Library | op/s |
1326
+ | ------------------- | ----------- |
1327
+ | **Arri (Compiled)** | 136,350,248 |
1328
+ | **Arri** | 49,111,714 |
1329
+ | JSON.parse() | 21,047,855 |
1335
1330
 
1336
1331
  #### Int Parsing (Bad Input)
1337
1332
 
1338
- | Library | op/s |
1339
- | -------------------- | ---------- |
1340
- | **Arri (Compiled)** | 60,596,060 |
1341
- | JSON.parse() | 11,390,955 |
1342
- | **Arri** | 10,151,546 |
1343
- | Ajv - JTD (Compiled) | 8,524,414 |
1333
+ | Library | op/s |
1334
+ | ------------------- | ---------- |
1335
+ | **Arri (Compiled)** | 60,790,411 |
1336
+ | JSON.parse() | 12,746,512 |
1337
+ | **Arri** | 9,824,069 |
1344
1338
 
1345
1339
  #### Int Serialization
1346
1340
 
1347
1341
  | Library | op/s |
1348
1342
  | -------------------------------------------- | ----------- |
1349
- | **Arri (Compiled)** | 199,750,275 |
1350
- | **Arri (Compiled) - Validate and Serialize** | 190,585,727 |
1351
- | Ajv - JTD (Compiled) | 188,008,270 |
1352
- | Typia | 108,341,757 |
1353
- | **Arri** | 62,210,662 |
1354
- | Typia - Validate and Serialize | 45,562,047 |
1355
- | JSON.stringify | 16,575,449 |
1343
+ | **Arri (Compiled) - Validate and Serialize** | 194,120,420 |
1344
+ | **Arri (Compiled)** | 186,143,375 |
1345
+ | Typia | 107,523,528 |
1346
+ | **Arri** | 59,302,746 |
1347
+ | Typia - Validate and Serialize | 47,194,163 |
1348
+ | JSON.stringify | 17,049,686 |
1356
1349
 
1357
1350
  #### Int Coercion (Good Input)
1358
1351
 
1359
1352
  | Library | op/s |
1360
1353
  | ----------------- | ---------- |
1361
- | **Arri** | 51,421,819 |
1362
- | TypeBox | 35,333,297 |
1363
- | Ajv - JSON Schema | 21,583,903 |
1364
- | Zod | 1,239,520 |
1354
+ | **Arri** | 50,428,605 |
1355
+ | TypeBox | 34,878,937 |
1356
+ | Ajv - JSON Schema | 32,125,175 |
1357
+ | Zod/v4 | 14,351,655 |
1358
+ | Zod | 1,197,013 |
1365
1359
 
1366
1360
  #### Int Coercion (Bad Input)
1367
1361
 
1368
1362
  | Library | op/s |
1369
1363
  | ----------------- | ---------- |
1370
- | **Arri** | 10,442,645 |
1371
- | TypeBox | 7,919,097 |
1372
- | Ajv - JSON Schema | 5,867,676 |
1373
- | Zod | 737,348 |
1364
+ | **Arri** | 10,088,606 |
1365
+ | TypeBox | 8,117,032 |
1366
+ | Ajv - JSON Schema | 6,979,847 |
1367
+ | Zod | 762,348 |
1368
+ | Zod/v4 | 99,086 |
1374
1369
 
1375
1370
  <!-- BENCHMARK_END -->
1376
1371
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/schema",
3
- "version": "0.79.1",
3
+ "version": "0.80.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -25,7 +25,7 @@
25
25
  "@standard-schema/spec": "1.0.0",
26
26
  "scule": "^1.3.0",
27
27
  "uncrypto": "^0.1.3",
28
- "@arrirpc/type-defs": "0.79.1"
28
+ "@arrirpc/type-defs": "0.80.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@ryoppippi/unplugin-typia": "^2.6.4",
@@ -36,6 +36,6 @@
36
36
  "benny": "^3.7.1",
37
37
  "typia": "^9.3.1",
38
38
  "valibot": "1.1.0",
39
- "zod": "^3.25.30"
39
+ "zod": "^3.25.56"
40
40
  }
41
41
  }