summaryrefslogtreecommitdiff
path: root/CLAUDE.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-16 19:05:09 +0300
committerPaul Buetow <paul@buetow.org>2025-06-16 19:05:09 +0300
commit754ac4bb68f9e145df07dd3c54a43f37654a5d50 (patch)
tree8647502e75d663fa8c602252d35c953861185d8e /CLAUDE.md
parenteac3f664b0c4109737f82375678e9694cf93f54b (diff)
Implement Profile-Based Optimization (PBO) automation with 39.9% performance improvement
- Add comprehensive PBO script (scripts/pbo.sh) for automated performance analysis - Implement timer allocation reduction using reusable timers (chunkedreader.go, stats.go, baseclient.go) - Optimize I/O operations with pre-allocated buffers and bulk writes (chunkedreader.go) - Enhance memory allocation patterns with improved buffer pooling - Add CPU and memory profiling support to dgrep command - Update Makefile with clean PBO target calling scripts/pbo.sh - Add PBO documentation to CLAUDE.md Performance improvements: - 39.9% faster execution time (2.918s → 1.753s average) - 38% reduction in CPU samples (3.04s → 1.87s) - Reduced byte-by-byte operations from 21.71% to 8.56% CPU usage - Eliminated repeated timer allocations across all components 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index f42f64b..c48aa35 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -42,6 +42,20 @@ make vet
make lint
```
+### Performance Optimization
+```bash
+# Run Profile-Based Optimization (PBO) for dgrep
+make pbo
+
+# This target will:
+# - Create test file (100MB with 1M lines) if needed
+# - Run baseline profiling (CPU and memory)
+# - Run performance benchmarks
+# - Generate optimized profiles
+# - Create detailed comparison report (pbo_report.txt)
+# - Show key optimizations implemented
+```
+
### Installation
```bash
# Install all binaries to $GOPATH/bin