1. Shlomi Fish
  2. perl-Statistics-Descriptive
  3. Pull requests

Pull requests

#6 Merged
Repository
shawn_laffan
Branch
default
Repository
shlomif
Branch
default

Make the methods faster

Author
  1. shawn_laffan
Reviewers
Description

Hello Shlomi,

As promised in a couple of CPAN RT tickets from a while ago, the Stats::Descriptive::Full methods can be made faster for common use cases.

This involves shifting some of the method calculations out of add_data, using a couple of List::Util and List::MoreUtils subs, and generally reducing the amount of processing done.

These changes are all based on code profiling I did a few months ago, and they result in substantial differences when many thousands of stats objects are created and populated.

I've used a four-space indent in the changes, and am happy to convert the rest of the file if you want. The parentheses are also mixed at the moment, so I can standardise that as well.

Regards, Shawn.

  • Learn about pull requests

Comments (0)