perf: special case arrays in partialMatchKey#11084
Conversation
This does 2 things: 1. If the values being compared are both arrays, iterate through them directly 2. Use a `for...of` instead of allocating an arrow function per recursive call The results: | Task name | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples | | -- | -- | -- | -- | -- | -- | | 'partialMatchKey dev' | '38.21 ± 0.16%' | '42.00 ± 0.00' | '24035274 ± 0.00%' | '23809524 ± 1' | 13086480 | | 'partialMatchKey prod' | '102.05 ± 0.52%' | '84.00 ± 1.00' | '10289814 ± 0.02%' | '11904762 ± 143431' | 4899508 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesPartial key matching
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@43081j what’s the “before” results? |
|
View your CI Pipeline Execution ↗ for commit 1a17713
☁️ Nx Cloud last updated this comment at |
|
@TkDodo the one that says "prod". |
🎯 Changes
This does 2 things:
directly
for...ofinstead of allocating an arrow function perrecursive call
The results:
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
Performance
Chores