A highly optimized implementation of the Riemann zeta function that provides significant performance improvements while maintaining accuracy.
| Method | Time Range | vs FastZeta |
|---|---|---|
| FastZeta | 0.7-2.5ms | 1x |
| Traditional | 71-105ms | 93-152x slower |
| Schönhage | 5-7ms | 6-7x slower |
| Riemann-Siegel | 7-11ms | 8-13x slower |
| Method | Time Range | vs FastZeta |
|---|---|---|
| FastZeta | ~0.9ms | 1x |
| Traditional | ~111ms | ~120x slower |
| Schönhage | ~7ms | ~8x slower |
| x Value | FastZeta Error | Schönhage Error |
|---|---|---|
| 5.0 | 0.000024% | 0.000001% |
| 10.0 | 0.002058% | 0.000000% |
| 15.0 | 0.000082% | 0.000000% |
| 20.0 | 0.000095% | 0.000000% |
Testing with Δx = 0.0001 at x = 25.0:
| Method | Base Result | Base+Δ Result | Difference |
|---|---|---|---|
| FastZeta | 1.000000000045 | 1.000000000045 | 0.000000000000 |
| Traditional | 1.000000029804 | 1.000000029801 | 0.000000000002 |
| Schönhage | 1.000000029804 | 1.000000029801 | 0.000000000002 |
All methods at x = 25.0:
| Method | Significant Digits | Time (ms) |
|---|---|---|
| FastZeta | 16 | 0.086 |
| Traditional | 16 | 10.730 |
| Schönhage | 16 | 0.385 |
| Method | Time Range | Accuracy |
|---|---|---|
| FastZeta | 0.087-0.253ms | Perfect reference |
| Traditional | 7.994-23.934ms | 0.000003% error |
| Schönhage | 0.383-1.032ms | 0.000003% error |
-
Speed
- FastZeta consistently outperforms all other methods
- Performance advantage increases with larger x values
- Especially efficient for complex inputs
-
Accuracy
- All methods achieve 16 digits of precision
- FastZeta shows perfect numerical stability
- Error rates remain consistently low across all ranges
-
Stability
- FastZeta shows zero variation with small input changes
- Other methods show minimal but measurable variations
- All methods maintain high precision throughout range
-
Trade-offs
- Traditional: Highest accuracy but slowest performance
- Schönhage: Good balance but still significantly slower than FastZeta
- FastZeta: Best performance with negligible accuracy loss
-
General Use
- Use FastZeta for most applications
- Excellent balance of speed and accuracy
- Particularly efficient for large-scale calculations
-
High-Precision Needs
- Traditional method still valuable for verification
- Use when absolute precision is critical
- Accept significant performance penalty
-
Complex Values
- FastZeta highly recommended for complex inputs
- Maintains performance advantage
- Other methods may struggle or fail
- All benchmarks run on same hardware
- Each test performed with 1000 iterations unless noted
- Complex values tested with imaginary component = 1
- Error rates calculated against traditional method as baseline