Created
March 25, 2018 13:19
-
-
Save titsuki/e7ff410b2f18be8d6a2f1e30d3b932d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl6 -e 'use Bench; use Text::Levenshtein::Damerau; use Text::Diff::Sift4; my $b = Bench.new; $b.timethese(1000, { "ld" => sub { ld("abcd","vwxy") }, "sift" => sub { sift4("a | |
bcd","vwxy")} })' | |
Benchmark: | |
Timing 1000 iterations of ld, sift... | |
ld: 1.068 wallclock secs (1.088 usr 0.028 sys 1.116 cpu) @ 936.421/s (n=1000) | |
sift: 0.008 wallclock secs (0.016 usr 0.000 sys 0.016 cpu) @ 124984.377/s (n=1000) | |
$ perl6 -e 'use Bench; use Text::Levenshtein::Damerau; use Text::Sift4; my $b = Bench.new; $b.timethese(1000, { "ld" => sub { ld("abcd","vwxy") }, "sift" => sub { sift4("abcd"," | |
vwxy")} })' | |
Benchmark: | |
Timing 1000 iterations of ld, sift... | |
ld: 1.084 wallclock secs (1.084 usr 0.036 sys 1.120 cpu) @ 922.733/s (n=1000) | |
sift: 0.086 wallclock secs (0.092 usr 0.004 sys 0.096 cpu) @ 11574.074/s (n=1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment