[email protected] bench node ./build/index.js
object with constraints:
[email protected] x 3,419,069 ops/sec ±1.09% (94 runs sampled)
[email protected] x 4,271,385 ops/sec ±1.19% (89 runs sampled)
Fastest is spectypes
nested object:
[email protected] x 8,827,259 ops/sec ±1.34% (88 runs sampled)
[email protected] x 11,111,487 ops/sec ±0.77% (94 runs sampled)
Fastest is spectypes
array of unions:
[email protected] x 152,251 ops/sec ±2.16% (90 runs sampled)
[email protected] x 514,716 ops/sec ±1.07% (90 runs sampled)
Fastest is spectypes