benchmark.pl - Compare Lingua::EO::Orthography with Lingua::EO::Supersignoj
Lingua::EO::Orthography has simplar implementation than Lingua::EO::Supersignoj.
Therefore, Lingua::EO::Orthography can convert string about 400% faster than Lingua::EO::Supersignoj.
Lingua::EO::Orthography
Lingua::EO::Supersignoj
In my environment (Strawberry Perl 5.10.0.1 on Windows XP Professional with SP3, AMD Opteron 252 @ 2.6GHz * 2, 2GB RAM):
---------------------------------------------------------------- Benchmark: timing 50000 iterations of Orthography->new, Supersignoj->nova... Orthography->new: 3 wallclock secs ( 3.22 usr + 0.00 sys = 3.22 CPU) @ 15532.77/s (n=50000) Supersignoj->nova: 5 wallclock secs ( 4.73 usr + 0.00 sys = 4.73 CPU) @ 10561.89/s (n=50000) Rate Supersignoj->nova Orthography->new Supersignoj->nova 10562/s -- -32% Orthography->new 15533/s 47% -- ---------------------------------------------------------------- Benchmark: timing 50000 iterations of Orthography->convert, Supersignoj->transkodigu... Orthography->convert: 2 wallclock secs ( 1.90 usr + 0.00 sys = 1.90 CPU) @ 26246.72/s (n=50000) Supersignoj->transkodigu: 10 wallclock secs ( 9.77 usr + 0.00 sys = 9.77 CPU) @ 5119.80/s (n=50000) Rate Supersignoj->transkodigu Orthography->convert Supersignoj->transkodigu 5120/s -- -80% Orthography->convert 26247/s 413% --
To use various $input and to test to convert it with various alignment (from/to).
$input
<moriya at cpan dot org>, http://gardejo.org/
<moriya at cpan dot org>
Copyright (c) 2010 MORIYA Masaki, alias Gardejo
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlgpl and perlartistic.
The full text of the license can be found in the LICENSE file included with this distribution.
To install Lingua::EO::Orthography, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::EO::Orthography
CPAN shell
perl -MCPAN -e shell install Lingua::EO::Orthography
For more information on module installation, please visit the detailed CPAN module installation guide.