an-cabal / an-rope

an rope data structure
https://docs.rs/an-rope
MIT License
11 stars 2 forks source link

Optimise Fibonacci method in Rope internals #28

Closed hawkw closed 7 years ago

hawkw commented 7 years ago

See TODO comment.

hawkw commented 7 years ago

I'm in favour of maybe adding a lookup table to optimise non-pathological fibonacci numbers, and then maybe falling back to recursion if the value is larger than the table. Could such a table perhaps be generated by a macro at compile-time?