fastify-ata 0.1.2 → 0.2.0

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 +9 -5
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Fastify plugin for [ata-validator](https://ata-validator.com) — JSON Schema validation powered by simdjson.
4
4
 
5
- Replaces the default ajv validator compiler with ata-validator for **145x faster schema compilation**.
5
+ Replaces the default ajv validator compiler with ata-validator. Beats ajv on every valid-path benchmark.
6
6
 
7
7
  ## Install
8
8
 
@@ -49,12 +49,16 @@ That's it. All your existing JSON Schema route definitions work as-is.
49
49
 
50
50
  | | ata-validator | ajv |
51
51
  |---|---|---|
52
- | Parallel batch (10K) | **12.5M items/sec (5.9x faster)** | 2.1M items/sec |
53
- | Schema compilation | **145x faster** | baseline |
54
- | Engine | simdjson + RE2 + multi-core | JS (single-thread) |
55
- | Spec compliance | 98.6% Draft 2020-12 | ~100% |
52
+ | validate(obj) valid | **1.1x faster** | baseline |
53
+ | validate(obj) 100 users | **2.7x faster** | baseline |
54
+ | Schema compilation | **151x faster** | baseline |
55
+ | Parallel batch (10K) | **5.9x faster** (12.5M items/sec) | 2.1M items/sec |
56
+ | Engine | simdjson + V8 codegen + multi-core | JS (single-thread) |
57
+ | Spec compliance | 98.5% Draft 2020-12 | ~100% |
56
58
  | Standard Schema V1 | Yes | No |
57
59
 
60
+ > ata uses speculative validation: a V8-optimized JS codegen fast path runs first. Valid data (the common case) never crosses the NAPI boundary.
61
+
58
62
  ## License
59
63
 
60
64
  MIT
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fastify-ata",
3
- "version": "0.1.2",
4
- "description": "Fastify plugin for ata-validator — JSON Schema validation powered by simdjson",
3
+ "version": "0.2.0",
4
+ "description": "Fastify plugin for ata-validator — beats ajv on every valid-path benchmark. 2.7x faster validate(obj), 151x faster compilation, simdjson + multi-core.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "homepage": "https://github.com/ata-core/fastify-ata#readme",
28
28
  "dependencies": {
29
- "ata-validator": "^0.2.0",
29
+ "ata-validator": "^0.4.0",
30
30
  "fastify-plugin": "^5.1.0"
31
31
  },
32
32
  "peerDependencies": {