Updated reports after bug fix

This commit is contained in:
connor committed 2026-09-29 18:21:40 -04:00
1 parent c20a090036
commit 2053aaa68e
3 files changed
+64 -62

No files matched your search

+19 -21
View File
@@ -1,6 +1,6 @@
# BS3 vs DP5 Benchmark Results
Generated: 2026-09-29 (re-measured; first run 2025-10-23)
Generated: 2026-09-29
## Summary
@@ -10,7 +10,7 @@ Comprehensive performance comparison between **BS3** (Bogacki-Shampine 3rd order
### Overall Performance Comparison
**DP5 is consistently faster than BS3 across all tested scenarios**, typically by a factor of **1.6x to 4.8x**.
**DP5 is consistently faster than BS3 across all tested scenarios**, typically by a factor of **1.2x to 5.1x**.
This might seem counterintuitive since BS3 uses fewer stages (4 vs 7), but several factors explain DP5's superior performance:
@@ -32,8 +32,8 @@ Despite being slower in these benchmarks, BS3 still has value:
| Method | Time | Ratio |
|--------|------|-------|
| **BS3** | 2.96 µs | 2.08x slower |
| **DP5** | 1.43 µs | baseline |
| **BS3** | 2.99 µs | 2.21x slower |
| **DP5** | 1.35 µs | baseline |
Simple 1D problem with smooth exponential solution.
@@ -41,8 +41,8 @@ Simple 1D problem with smooth exponential solution.
| Method | Time | Ratio |
|--------|------|-------|
| **BS3** | 27.45 µs | 2.26x slower |
| **DP5** | 12.16 µs | baseline |
| **BS3** | 27.37 µs | 2.76x slower |
| **DP5** | 9.92 µs | baseline |
2D conservative system with periodic solution.
@@ -50,8 +50,8 @@ Simple 1D problem with smooth exponential solution.
| Method | Time | Ratio |
|--------|------|-------|
| **BS3** | 113.66 µs | 3.65x slower |
| **DP5** | 31.15 µs | baseline |
| **BS3** | 113.44 µs | 3.81x slower |
| **DP5** | 29.74 µs | baseline |
Nonlinear 2D system with trigonometric terms.
@@ -59,8 +59,8 @@ Nonlinear 2D system with trigonometric terms.
| Method | Time | Ratio |
|--------|------|-------|
| **BS3** | 102.04 µs | 1.56x slower |
| **DP5** | 65.52 µs | baseline |
| **BS3** | 98.02 µs | 5.07x slower |
| **DP5** | 19.32 µs | baseline |
Higher-dimensional problem with gravitational dynamics.
@@ -68,8 +68,8 @@ Higher-dimensional problem with gravitational dynamics.
| Method | Time (solve + 100 interpolations) | Ratio |
|--------|-----------------------------------|-------|
| **BS3** | 16.28 µs | 4.70x slower |
| **DP5** | 3.46 µs | baseline |
| **BS3** | 16.34 µs | 4.67x slower |
| **DP5** | 3.50 µs | baseline |
BS3 uses cubic Hermite interpolation, DP5 uses optimized 5th order interpolation.
@@ -79,14 +79,11 @@ Performance across different tolerance levels (`y' = -y` problem):
| Tolerance | BS3 Time | DP5 Time | Ratio (BS3/DP5) |
|-----------|----------|----------|-----------------|
| 1e-3 | 1.15 µs | 0.92 µs | 1.25x |
| 1e-4 | 2.01 µs | 1.19 µs | 1.69x |
| 1e-5 | 3.41 µs | 1.45 µs | 2.36x |
| 1e-6 | 6.72 µs | 1.92 µs | 3.50x |
| 1e-7 | 13.55 µs | 2.82 µs | 4.80x |
Both 1e-6 and 1e-7 are now measured. The earlier run estimated 1e-6 from the
trend and did not complete 1e-7.
| 1e-3 | 1.10 µs | 0.91 µs | 1.21x |
| 1e-4 | 1.87 µs | 1.19 µs | 1.57x |
| 1e-5 | 3.46 µs | 1.44 µs | 2.40x |
| 1e-6 | 6.77 µs | 1.95 µs | 3.46x |
| 1e-7 | 13.73 µs | 2.79 µs | 4.91x |
**Observation**: The performance gap widens as tolerance tightens, because DP5's higher order allows it to take larger steps while maintaining accuracy.
@@ -96,7 +93,8 @@ trend and did not complete 1e-7.
1. **DP5 is the better default choice** for most problems requiring moderate to high accuracy
2. **Performance gap increases** with tighter tolerances (favoring DP5)
3. **Higher dimensions** slightly favor BS3 relative to DP5 (1.56x vs 3.65x slowdown)
3. **Higher dimensions favor DP5 most strongly** (5.07x on the 6D orbit against
2.21x on 1D exponential decay)
4. **Interpolation** strongly favors DP5 (4.7x faster)
### Implementation Quality