Loading...
Loading...
Improve code performance without changing behavior. Use when code fails latency/throughput requirements. Covers profiling, caching, and algorithmic optimization.
npx skill4agent add dralgorhythm/claude-agentic-framework optimizing-code// Memoization
const cache = new Map<string, Result>();
function expensiveCalculation(input: string): Result {
if (cache.has(input)) {
return cache.get(input)!;
}
const result = /* expensive work */;
cache.set(input, result);
return result;
}# Node.js
node --prof app.js
node --prof-process isolate-*.log
# Python
python -m cProfile -s cumtime script.py
# Go
go test -bench=. -cpuprofile=cpu.prof
go tool pprof cpu.prof