Skip to content

Random text generator using a parallelized Markov chain algorithm

License

Notifications You must be signed in to change notification settings

alexmchen0/parallel-markov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallel Markov Chain Builder

A random text generator using a parallelized version of the Markov chain algorithm implemented here.

Explores Go's extensive concurrency primitives (goroutines, channels, mutexes, barriers, etc.) and synchronization techniques with a goal to achieve speedup in a pretty fun/interesting application.

Goal: To parallelize Markov chain creation for random word generators in Go. The Markov chain is stored as a map from prefixes to suffixes which is built upon/written to by multiple threads and thus needs to be synchronized.

  • coarse-grain compares synchronization of a shared map[string][]string using sync.Mutex vs channels
  • fine-grain stores the Markov chain in a sync.Map, Go's concurrent map implementation

About

Random text generator using a parallelized Markov chain algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published