-
-
Save Orbyt/d9ed93b8c8a62cb7fa576d65666c2644 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
require 'benchmark' | |
Benchmark.bmbm do |x| | |
x.report("No matches diff length") { "password123" == "321get"} | |
x.report("No matches same length") { "password123" == "321kmnktget"} | |
x.report("First matches") { "password123" == "p533melw321" } | |
x.report("First three matches") { "password123" == "pas3melw361" } | |
x.report("First six matches") { "password123" == "passwolw369" } | |
x.report("All matches") { "password123" == "password123" } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment