An open API service indexing awesome lists of open source software.

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

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