1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

NAME
Algorithm::Diff::XS  Algorithm::Diff with XS core loop
SYNOPSIS
# Dropin replacement to Algorithm::Diff, but "compact_diff"
# and C<LCSidx> will run much faster for large data sets.
use Algorithm::Diff::XS qw( compact_diff LCSidx );
DESCRIPTION
This module is a simple repackaging of Joe Schaefer's excellent but not
very wellknown Algorithm::LCS with a dropin interface that simply
reuses the installed version of the Algorithm::Diff module.
Note that only the "LCSidx" function is optimized in XS at the moment,
which means only "compact_diff" will get significantly faster for large
data sets, while "diff" and "sdiff" will run in identical speed as
"Algorithm::Diff".
BENCHMARK
Rate Algorithm::Diff Algorithm::Diff::XS
Algorithm::Diff 14.7/s  98%
Algorithm::Diff::XS 806/s 5402% 
The benchmarking script is as below:
my @data = ([qw/a b d/ x 50], [qw/b a d c/ x 50]);
cmpthese( 500, {
'Algorithm::Diff' => sub {
Algorithm::Diff::compact_diff(@data)
},
'Algorithm::Diff::XS' => sub {
Algorithm::Diff::XS::compact_diff(@data)
},
});
SEE ALSO
Algorithm::Diff, Algorithm::LCS.
AUTHORS
Audrey Tang <cpan@audreyt.org>
COPYRIGHT
Copyright 2008 by Audrey Tang <cpan@audreyt.org>.
Contains derived code copyrighted 2003 by Joe Schaefer,
<joe+cpan@sunstarsys.com>.
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
