https://github.com/timelessnesses/fibbonaci-rust
A bunch of fibbonacis functions ranging the speeds
https://github.com/timelessnesses/fibbonaci-rust
Last synced: about 2 months ago
JSON representation
A bunch of fibbonacis functions ranging the speeds
- Host: GitHub
- URL: https://github.com/timelessnesses/fibbonaci-rust
- Owner: timelessnesses
- Created: 2024-07-31T08:14:50.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T09:30:56.000Z (over 1 year ago)
- Last Synced: 2025-01-01T15:42:25.722Z (over 1 year ago)
- Language: Rust
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fibs
just very fast fibbonaci functions (TC: Time Complexity, SC: Space Complexity)
## order
1. `fib_st_matrix_expo` (TC: O(log(n)), SC: O(1)) [https://www.youtube.com/watch?v=KzT9I1d-LlQ](https://www.youtube.com/watch?v=KzT9I1d-LlQ)
2. `fib_st_memo_vec` (TC: O(n), SC: O(n))
3. `fib_st_memo_hashmap` (TC: O(n), SC: O(n))
4. `fib_st_matrix` (TC: O(n), SC: O(1)) [https://www.youtube.com/watch?v=KzT9I1d-LlQ](https://www.youtube.com/watch?v=KzT9I1d-LlQ)
5. `fib_st_linear` (TC: O(n), SC: O(1))
6. `fib_gpu_matrix` (TC: O(n), SC: O(1))
7. `fib_gpu_matrix_expo` (TC: O(log(n)), SC: O(1))
8. `fib_gpu_linear` (TC: O(n), SC: O(1))
9. `fib_st_normal` (TC: O(2^n), SC: O(n))
10. `fib_gpu_normal` (TC: O(2^n), SC: O(n)) (crashing my gpu)
## note
`fib_gpu_matrix` and `fib_gpu_matrix_expo` seems to struggles and hiccup from time to time while `fib_gpu_linear` is actually has stable generation rate and doesn't hiccup.
exit test early with `q` key or `esc` key
sort by fibbonaci per sec (default) with `s` and press again for sort by count per sec