Performance Benchmarking Pattern
Implements a data-driven approach to code optimization by measuring, profiling, and validating performance changes using Norvig patterns.
The benchmark-before-optimize skill equips Claude with a rigorous methodology for performance engineering based on Peter Norvig's software patterns. Instead of guessing where code is slow, this skill guides the process of establishing a baseline using CPU process time, identifying specific bottlenecks through profiling tools like cProfile or %prun, and validating every optimization with comparative metrics. It is particularly effective when working with complex algorithms, data processing pipelines, or any code where execution speed is a critical requirement, ensuring that optimizations are both necessary and effective.