Skip to content

Counts distinct words in a text file using different methods for counting (including parallel) and different split methods.

Notifications You must be signed in to change notification settings

vbaros/CountDistinctWords

Repository files navigation

CountDistinctWords

Counts distinct words in a text file using different functions for counting (including parallel) and different split methods.

Here is the output from all the included count and split functions. The best and worst times for each split function are highlighted. The results are grouped by split functions and are executed in this order:

  • SplitFunctions.SplitToWordsReplace
  • SplitFunctions.SplitWithLinq
  • SplitFunctions.SplitToWordsNormal
  • SplitFunctions.SplitToWordsNormalDistinct
  • SplitToWordsRegex

There are 2 examples:

  1. Shows counting on a 100MB file consisting of words randomly generated from dictionary file.
  2. Shows counting on a 100MB file consisting of words completely randomly generated.

Dictionary generated

Randomly generated

About

Counts distinct words in a text file using different methods for counting (including parallel) and different split methods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages