NAME
Bencher::Scenario::DamerauLevenshteinModules - Benchmark various modules calculating the Damerau-Levenshtein edit distance
VERSION
This document describes version 0.11 of Bencher::Scenario::DamerauLevenshteinModules (from Perl distribution Bencher-Scenarios-LevenshteinModules), released on 2016-10-14.
SYNOPSIS
To run benchmark with default option:
% bencher -m DamerauLevenshteinModules
To run module startup overhead benchmark:
% bencher --module-startup -m DamerauLevenshteinModules
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help
.
DESCRIPTION
Packaging a benchmark script as a Bencher scenario makes it convenient to include/exclude/add participants/datasets (either via CLI or Perl code), send the result to a central repository, among others . See Bencher and bencher (CLI) for more details.
BENCHMARKED MODULES
Version numbers shown below are the versions used when running the sample benchmark.
Text::Levenshtein::Damerau::PP 0.25
Text::Levenshtein::Damerau::XS 3.1
BENCHMARK PARTICIPANTS
Text::Levenshtein::Damerau::PP::pp_edistance (perl_code)
Function call template:
Text::Levenshtein::Damerau::PP::pp_edistance(<word1>, <word2>)
Text::Levenshtein::Damerau::XS::xs_edistance (perl_code)
Function call template:
Text::Levenshtein::Damerau::XS::xs_edistance(<word1>, <word2>)
BENCHMARK DATASETS
a
foo
program
reve [unicode]
euro [unicode]
SAMPLE BENCHMARK RESULTS
Run on: perl: v5.24.0, CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz (4 cores), OS: GNU/Linux Debian version 8.0, OS kernel: Linux version 3.16.0-4-amd64.
Benchmark with default options (bencher -m DamerauLevenshteinModules
):
#table1#
+----------------------------------------------+---------+-----------+-----------+------------+---------+---------+
| participant | dataset | rate (/s) | time (μs) | vs_slowest | errors | samples |
+----------------------------------------------+---------+-----------+-----------+------------+---------+---------+
| Text::Levenshtein::Damerau::PP::pp_edistance | program | 15000 | 68 | 1 | 3.4e-07 | 21 |
| Text::Levenshtein::Damerau::PP::pp_edistance | euro | 32000 | 32 | 2.2 | 5.2e-08 | 21 |
| Text::Levenshtein::Damerau::PP::pp_edistance | reve | 32333 | 30.928 | 2.2118 | 1.4e-10 | 28 |
| Text::Levenshtein::Damerau::PP::pp_edistance | foo | 59000 | 17 | 4 | 6e-08 | 20 |
| Text::Levenshtein::Damerau::PP::pp_edistance | a | 164000 | 6.09 | 11.2 | 1.7e-09 | 20 |
| Text::Levenshtein::Damerau::XS::xs_edistance | program | 430000 | 2.3 | 29 | 3.3e-09 | 20 |
| Text::Levenshtein::Damerau::XS::xs_edistance | reve | 555000 | 1.8 | 38 | 8.4e-10 | 20 |
| Text::Levenshtein::Damerau::XS::xs_edistance | euro | 600000 | 1.7 | 41 | 4.2e-09 | 20 |
| Text::Levenshtein::Damerau::XS::xs_edistance | foo | 690000 | 1.4 | 48 | 1.7e-09 | 20 |
| Text::Levenshtein::Damerau::XS::xs_edistance | a | 920000 | 1.1 | 63 | 1.7e-09 | 20 |
+----------------------------------------------+---------+-----------+-----------+------------+---------+---------+
Benchmark module startup overhead (bencher -m DamerauLevenshteinModules --module-startup
):
#table2#
+--------------------------------+-----------+------------------------+------------+---------+---------+
| participant | time (ms) | mod_overhead_time (ms) | vs_slowest | errors | samples |
+--------------------------------+-----------+------------------------+------------+---------+---------+
| Text::Levenshtein::Damerau::PP | 9.3 | 4.5 | 1 | 3.1e-05 | 20 |
| Text::Levenshtein::Damerau::XS | 6.9 | 2.1 | 1.3 | 3.1e-05 | 20 |
| perl -e1 (baseline) | 4.8 | 0 | 1.9 | 3.7e-05 | 20 |
+--------------------------------+-----------+------------------------+------------+---------+---------+
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenarios-LevenshteinModules.
SOURCE
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-LevenshteinModules.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-LevenshteinModules
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
SEE ALSO
Bencher::Scenario::LevenshteinModules
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.