Added some benchmarking tooling to have an idea of how changes affect
performance
Moved code around to allow for more constant values and fewer memory
allocations
Switch to non-callback validation function to remove extra closure
We may want to log the benchmarks to see how that look over time or across different node versions...
valid x 28,130 ops/sec ±1.68% (85 runs sampled)
invalid x 16,185 ops/sec ±1.85% (85 runs sampled)
This run was with these changes on node 6
Previous run before changes
valid x 27,035 ops/sec ±1.02% (82 runs sampled)
invalid x 15,341 ops/sec ±1.72% (80 runs sampled)
Added some benchmarking tooling to have an idea of how changes affect performance Moved code around to allow for more constant values and fewer memory allocations Switch to non-callback validation function to remove extra closure
We may want to log the benchmarks to see how that look over time or across different node versions...
This run was with these changes on node 6
Previous run before changes