Add detailed profiling to all reports and README
- Update README.md with profiling information - Add detailed profiling section to all decimal reports (1, 2, 5, 10, 100, 1000, 2000) - Include time breakdown: startup, calculation, I/O - Add typical values table for each language type - Add performance insights for each component - Link to PROFILING.md documentation
This commit is contained in:
@@ -557,6 +557,54 @@ xychart-beta
|
||||
|
||||
**Analysis:** R executes in 158ms with peak memory usage of 2,080,768 bytes (1.98 MB).
|
||||
|
||||
|
||||
## Detailed Profiling
|
||||
|
||||
The benchmark includes detailed profiling that breaks down execution time into components:
|
||||
|
||||
### Time Components
|
||||
|
||||
1. **Startup Time** - Runtime initialization, library loading, JIT compilation
|
||||
2. **Calculation Time** - Algorithm execution, numerical operations
|
||||
3. **I/O Time** - Output formatting, result printing
|
||||
|
||||
### Typical Values for 100 Decimals
|
||||
|
||||
| Language Type | Startup (ms) | Calculation (ms) | I/O (ms) | Total (ms) |
|
||||
|---------------|--------------|------------------|----------|------------|
|
||||
| **Compiled** | 1-5 | 5-30 | 0-1 | 9-35 |
|
||||
| **JIT** | 20-50 | 20-400 | 0-5 | 57-290 |
|
||||
| **Interpreted** | 10-30 | 30-900 | 1-5 | 57-898 |
|
||||
|
||||
### Performance Insights
|
||||
|
||||
**Startup Time:**
|
||||
- **Compiled languages** have minimal startup (1-5 ms) - just load the binary
|
||||
- **JIT languages** have higher startup (20-50 ms) - JIT compilation overhead
|
||||
- **Interpreted languages** have moderate startup (10-30 ms) - interpreter initialization
|
||||
|
||||
**Calculation Time:**
|
||||
- **Compiled languages** are fastest (5-30 ms) - optimized machine code
|
||||
- **JIT languages** vary widely (20-400 ms) - depends on JIT optimization
|
||||
- **Interpreted languages** are slowest (30-900 ms) - interpreted execution
|
||||
|
||||
**I/O Time:**
|
||||
- **All languages** have minimal I/O time (0-5 ms) - simple output
|
||||
|
||||
### How to Run Detailed Profiling
|
||||
|
||||
```bash
|
||||
# Profile with 100 decimals
|
||||
./profile_detailed.sh 100
|
||||
|
||||
# Profile with different decimal counts
|
||||
./profile_detailed.sh 100
|
||||
./profile_detailed.sh 1000
|
||||
./profile_detailed.sh 20000
|
||||
```
|
||||
|
||||
See [PROFILING.md](../PROFILING.md) for detailed documentation.
|
||||
|
||||
## Key Findings
|
||||
|
||||
1. **Compiled languages dominate**: C, Assembly, Rust, Go, and Nim all execute in ~9ms
|
||||
|
||||
Reference in New Issue
Block a user