diff --git a/C#/Console/Program.cs b/C#/Console/Program.cs index 4976139..2807956 100644 --- a/C#/Console/Program.cs +++ b/C#/Console/Program.cs @@ -1,3 +1,5 @@ using LevenshteinRatio; -Console.WriteLine(Levenshtein.Ratio("exampel", "example")); +for (int i = 0; i < 1000000; i++) { + Console.WriteLine(i + Levenshtein.Ratio("test", "kitten")); +} diff --git a/Haskell/app/Main.hs b/Haskell/app/Main.hs index 563a71f..94f0309 100644 --- a/Haskell/app/Main.hs +++ b/Haskell/app/Main.hs @@ -5,9 +5,13 @@ import Text.Format main :: IO () main = do - let source = "kitten" - target = "sitting" - - putStrLn $ format "Source\t{0}" [source] - putStrLn $ format "Target\t{0}" [target] - putStrLn $ format "Ratio\t{0}" [show (levenshteinRatio source target)] + repeatNTimes + 1000000 + (putStrLn + (format "{0}" [show (levenshteinRatio "test" "kitten")]) + ) + where + repeatNTimes 0 _ = return () + repeatNTimes n action = do + action + repeatNTimes (n-1) action \ No newline at end of file diff --git a/Typescript/console.ts b/Typescript/console.ts new file mode 100644 index 0000000..281a6c7 --- /dev/null +++ b/Typescript/console.ts @@ -0,0 +1,5 @@ +import { levenshteinRatio } from "./levenshteinRatio.ts"; + +for (let i = 0; i < 1000000; i++) { + console.log(levenshteinRatio('test', 'kitten')); +} \ No newline at end of file