-
Notifications
You must be signed in to change notification settings - Fork 0
List Compare Performance Improvements
List-Compare is a library which enables the user to compare two or more lists and determine set relationships such as intersection, union, symmetric difference, etc. It began as a modularization of certain "recipes" in The Perl Cookbook but grew in functionality and in modes of access. It has both object-oriented and functional interfaces. It made its CPAN debut in 2002.
In early 2015 the author refactored many of the internal functions of List-Compare for the purpose of speeding up performance. Between version 0.39 and the current version, 0.49, most of the functions had their performance measurably improved. (Those measurements may be found in certain of the commit messages.) However, certain functions have not yet been refactored and so their performance is presumed to still be sub-optimal.
The following four subroutines appear as methods in List::Compare (the object-oriented interface) and as functions in List::Compare::Functional.
is_LsubsetR
is_RsubsetL
is_LequivalentR
is_LdisjointR
Benchmark their current performance, then refactor the internal subroutines underlying these four API-level subroutines. Ensure that all existing tests continue to pass. Prepare a patch for the author and attach it to the rt.cpan.org bug ticket listed below.
-
CPAN addresses: http://search.cpan.org/dist/List-Compare/, https://metacpan.org/pod/List::Compare
-
CPAN Testers Results http://matrix.cpantesters.org/?dist=List-Compare
-
Repository https://github.com/jkeenan/List-Compare
-
Bug Tracker https://rt.cpan.org/Ticket/Display.html?id=102994
Jim Keenan; jkeenan at cpan dot org; irc.perl.org: kid51
dha (David H. Adler)
Mark Phelan; phelanm
kid51: Placed on https://github.com/jkeenan/compare-git-versions a documented version of the tool I used to simultaneously test and benchmark individual functions within List-Compare.
kid51: Mich Rawson filed a pull request for revisions to is_LsubsetR()
. After reviewing it and writing benchmarks, I applied it as a patch and uploaded http://search.cpan.org/~jkeenan/List-Compare-0.50/ to CPAN.
Hey! The above document had some coding errors, which are explained below:
- Around line 60:
-
alternative text 'http://search.cpan.org/~jkeenan/List-Compare-0.50/' contains non-escaped | or /