ata-validator
1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed
0.22.0 is the newest release of 0.4.x.
Release note
found and fixed hot path bottlenecks using profiling.
additionalProperties: replaced Set + for loop with Object.getOwnPropertyNames().length. 10x faster on schemas with additionalProperties: false.
destructuring: removed. direct d["key"] access is faster in V8 than destructuring batch reads.
regex: moved from function body to closure. was calling new RegExp() on every validate(), now pre-compiled once and reused.
schema cache: same schema string reuses previously compiled functions. skips new Function() entirely on repeated schemas.
numbers:
first validation: 450x faster than ajv (16K -> 396K ops/sec)
isValidObject: 39.5M ops/sec (2.2x faster than ajv, on par with typebox)
validate valid: 25.5M ops/sec (1.3x faster than ajv)
validate invalid: 17.7M ops/sec (1.3x faster than ajv)
constructor: 1,580x faster
thanks @lemire for the profiling approach.