The 1 Millionth Fibonacci Challenge is a Rust-based competition where participants submit a pull request (PR) attempting to compute the 1 Millionth Fibonacci number (F(1,000,000)) as efficiently as possible. The goal is to achieve the fastest computation time using Rust.
The Fibonacci sequence is a series of numbers where each term is the sum of the two preceding ones. It is defined recursively as follows:
[ F(0) = 0, \quad F(1) = 1, ] [ F(n) = F(n-1) + F(n-2), \quad \text{for } n \geq 2. ]
The sequence begins as:
[ 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, \dots ]
- Objective: Submit a Rust PR that computes the 1 Millionth Fibonacci number as efficiently as possible.
- Allowed Methods: Any computational method is allowed, including algorithmic optimizations and parallel computing, as long as it runs in Rust.
- Language Restriction: Only Rust is allowed.
- Submission Format: PRs must include code, benchmarking results, and a description of the approach used.
- Time Limit: Solutions must complete within a reasonable execution time.
- Verification: Submissions will be tested for correctness and performance.
- Leaderboard: The fastest verified solution will be displayed on a public leaderboard.
- External Libraries: No external dependencies may be used (only Rust’s standard library is allowed).
- File Structure: Implementations Edit the
src/code.rswith your code and submit the PR! - Computation Time: The Fibonacci computation must happen at runtime—precomputed values or build-time optimizations are not allowed.
- Output Requirements:
- The full number must be computed if feasible.
- If full computation is impractical, the last 10 digits must be correctly computed.
- Memory Usage: Implementations must not require excessive memory.
- Parallelization: Multithreading and SIMD optimizations are allowed.
- Benchmarking: Performance will be measured on a modern CPU under identical conditions.
- Fair Play: Implementations must work for arbitrary large Fibonacci numbers.
| Rank | Github | Time |
|---|---|---|
| 1 | wyattgill9 | 100 |