Closed GuiltyDolphin closed 8 years ago
The current code is working fine and is concise and I don't see any point in this switch.
@GuiltyDolphin Is there any specific benefit to switching? (Performance perhaps?)
@mintsoft The package is faster, has more features (if we wish to expand) and more robust; is it not one of the Perl sayings "Don't re-invent the wheel"?
Anyway, some cool things this package provides:
ith
- the ith
Fibonacci number (can do very large numbers very quickly).
NumSeq::Fibonacci
uses BigInt
for large numbers it can handle much larger numbers.pred
- check if a number is in the Fibonacci sequence is 71 a fibonacci number
Also there's a bunch of other sequences in Math::NumSeq
so if this were a dependency it would open those up to others.
Well that's cool; if we want to extend the functionality of the IA then I agree it makes sense to switch it out at that time
Unless you have a concrete utilization of its "more features" for extending, I would still not see any particular point in switching and yet having the same functionality as we do now. In other words, the switch should be made only if you have added a new feature to the code that comes from the proposed module.
@koosha-- I quite like the idea of being able to ask is X a fibonacci number
- I'll make an issue for it.
I was going to start with this issue before adding the functionality in #3070 and had a couple of questions.
remainder
, rather than remainder_lc
. Thus, "What is the 5th Fibonacci?" doesn't trigger, where "what is the 5th fibonacci" does. Is that desired? Also, for my own information, it seems like both "Fibonacci" and "fibonacci" trigger, assuming triggers are not case sensitive?Thanks!
EDIT: Played around with it using duckpan query
, I don't notice a time difference between querying for the 1470th or the 25000th number, using the Perl package. Tested with even higher numbers with out much delay (until you start hitting over 100000), but kind of question how useful that is.
@shellhead Thanks.
Yeah, generally we want case-insensitive triggering (unless there is a good reason for it :) ).
Yah, the Fib package is a lot faster so you wont notice much difference until really high queries - I'd imagine a sensible limit would be fine.
Instead of rolling our own, we could use a package like Math::NumSeq::Fibonacci to generate the Fibonacci numbers.
IA Page: http://duck.co/ia/view/fibonacci Maintainer: @koosha--