to the assumption that a “better algorithm” probably exists, and that a CPAN author probably found it.
Maybe. But do realize that something being on CPAN only means that a author found a algorithm. It may be correct, it may not be. It may be better, it may not be. The more times a wheel has been reinvented, the chance one of the authors has a better algorithm increases. It's also going to be harder to pick the better one (as there will be more choice).
Do also note that many CPAN authors try to be "complete", and engineer their provided solution to be as general as possible. That usually comes with a price. In fact, if performance really matters, not using CPAN is often the better solution: now you can create something that's tailor made for your environment, and you don't have to pay a price for being more general.