Bencher-Scenarios-LevenshteinModules
view release on metacpan or search on metacpan
- [build] Rebuild with new version of Bencher (0.28) for a nicer results
table.
0.06 2016-01-11 (PERLANCAR)
- Set on_result_failure to warn by default, because the results are
different for some modules due to algorithm difference.
- Also tag PERLANCAR::Text::Levenshtein as no_unicode_support.
0.05 2016-01-10 (PERLANCAR)
- Exclude Text::LevenshteinXS from Unicode tests [RT#111029].
0.04 2016-01-10 (PERLANCAR)
- Add some Unicode datasets [RT#111029].
lib/Bencher/Scenario/DamerauLevenshteinModules.pm view on Meta::CPAN
},
{
module => 'Text::Fuzzy',
code_template => "Text::Fuzzy->new(<word1>, trans=>1)->distance(<word2>)",
},
],
datasets => [
{ name=>"a", args => {word1=>"a" , word2=>"aa"}, result => 1 },
{ name=>"foo", args => {word1=>"foo" , word2=>"bar"}, result => 3 },
{ name=>"program", args => {word1=>"program", word2=>"porgram"}, result => 1 },
{ name=>"reve" , args => {word1=>"reve" , word2=>"rêves"}, result => 2, tags=>['unicode'], exclude_participant_tags=>['no_unicode_support'] },
{ name=>"euro" , args => {word1=>"Euro" , word2=>"â¬uro"}, result => 1, tags=>['unicode'], exclude_participant_tags=>['no_unicode_support'] },
],
on_result_failure => 'warn',
};
1;
# ABSTRACT: Benchmark various modules calculating the Damerau-Levenshtein edit distance
__END__
=pod
lib/Bencher/Scenario/DamerauLevenshteinModules.pm view on Meta::CPAN
=head1 BENCHMARK DATASETS
=over
=item * a
=item * foo
=item * program
=item * reve [unicode]
=item * euro [unicode]
=back
=head1 SAMPLE BENCHMARK RESULTS
Run on: perl: I<< v5.24.0 >>, CPU: I<< Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz (2 cores) >>, OS: I<< GNU/Linux LinuxMint version 17.3 >>, OS kernel: I<< Linux version 3.19.0-32-generic >>.
Benchmark with default options (C<< bencher -m DamerauLevenshteinModules >>):
#table1#
lib/Bencher/Scenario/LevenshteinModules.pm view on Meta::CPAN
use warnings;
our $scenario = {
summary => 'Benchmark various modules calculating the Levenshtein edit distance',
modules => {
'Text::Levenshtein' => {version => 0.11},
},
participants => [
{
fcall_template => "PERLANCAR::Text::Levenshtein::editdist(<word1>, <word2>)",
tags => ['no_unicode_support'],
},
{
fcall_template => "Text::Levenshtein::fastdistance(<word1>, <word2>)",
},
{
fcall_template => "Text::Levenshtein::XS::distance(<word1>, <word2>)",
},
{
fcall_template => "Text::Levenshtein::Flexible::levenshtein(<word1>, <word2>)",
},
{
fcall_template => "Text::LevenshteinXS::distance(<word1>, <word2>)",
tags => ['no_unicode_support'],
},
{
module => 'Text::Fuzzy',
code_template => "Text::Fuzzy->new(<word1>)->distance(<word2>)",
},
],
datasets => [
{ name=>"a", args => {word1=>"a" , word2=>"aa"}, result => 1 },
{ name=>"foo", args => {word1=>"foo" , word2=>"bar"}, result => 3 },
{ name=>"program", args => {word1=>"program", word2=>"porgram"}, result => 2 },
{ name=>"reve" , args => {word1=>"reve" , word2=>"rêves"}, result => 2, tags=>['unicode'], exclude_participant_tags=>['no_unicode_support'] },
{ name=>"euro" , args => {word1=>"Euro" , word2=>"â¬uro"}, result => 1, tags=>['unicode'], exclude_participant_tags=>['no_unicode_support'] },
],
on_result_failure => 'warn',
};
1;
# ABSTRACT: Benchmark various modules calculating the Levenshtein edit distance
__END__
=pod
lib/Bencher/Scenario/LevenshteinModules.pm view on Meta::CPAN
L<Text::Levenshtein::Flexible> 0.09
L<Text::Levenshtein::XS> 0.503
L<Text::LevenshteinXS> 0.03
=head1 BENCHMARK PARTICIPANTS
=over
=item * PERLANCAR::Text::Levenshtein::editdist (perl_code) [no_unicode_support]
Function call template:
PERLANCAR::Text::Levenshtein::editdist(<word1>, <word2>)
=item * Text::Levenshtein::fastdistance (perl_code)
Function call template:
lib/Bencher/Scenario/LevenshteinModules.pm view on Meta::CPAN
=item * Text::Levenshtein::Flexible::levenshtein (perl_code)
Function call template:
Text::Levenshtein::Flexible::levenshtein(<word1>, <word2>)
=item * Text::LevenshteinXS::distance (perl_code) [no_unicode_support]
Function call template:
Text::LevenshteinXS::distance(<word1>, <word2>)
=item * Text::Fuzzy (perl_code)
Code template:
lib/Bencher/Scenario/LevenshteinModules.pm view on Meta::CPAN
=head1 BENCHMARK DATASETS
=over
=item * a
=item * foo
=item * program
=item * reve [unicode]
=item * euro [unicode]
=back
=head1 SAMPLE BENCHMARK RESULTS
Run on: perl: I<< v5.24.0 >>, CPU: I<< Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz (2 cores) >>, OS: I<< GNU/Linux LinuxMint version 17.3 >>, OS kernel: I<< Linux version 3.19.0-32-generic >>.
Benchmark with default options (C<< bencher -m LevenshteinModules >>):
#table1#
( run in 0.521 second using v1.01-cache-2.11-cpan-88abd93f124 )