javascript
Installation
SKILL.md
JavaScript Performance
Micro-optimizations for high-performance JavaScript.
Instructions
1. Use Set for Lookups
// ❌ Bad - O(n) lookup
const ids = [1, 2, 3, 4, 5];
if (ids.includes(targetId)) { ... }
// ✅ Good - O(1) lookup
const idSet = new Set([1, 2, 3, 4, 5]);
if (idSet.has(targetId)) { ... }